@labdigital/commercetools-mock 2.49.1 → 2.50.0

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 CHANGED
@@ -1,1367 +1,1517 @@
1
- import * as msw from 'msw';
2
- import express from 'express';
3
- import { SetupServerApi, SetupServer } from 'msw/node';
4
- import * as ctp from '@commercetools/platform-sdk';
5
- import { BaseResource, Project, UpdateAction, QueryParam, ProductTailoring, CartDraft, Cart, LineItemDraft, LineItem, OrderFromCartDraft, Order, CartReference, OrderImportDraft, QuoteRequestDraft, MyQuoteRequestDraft, QuoteRequest, AssociateRoleDraft, AssociateRole, AttributeGroupDraft, AttributeGroup, BusinessUnitDraft, BusinessUnit, CartDiscountDraft, CartDiscount, CategoryDraft, Category, ChannelDraft, Channel, CustomObjectDraft, CustomObject, CustomerDraft, Customer, CustomerCreatePasswordResetToken, CustomerToken, CustomerResetPassword, MyCustomerResetPassword, Address, StoreKeyReference, CustomerGroupDraft, CustomerGroup, DiscountCodeDraft, DiscountCode, ExtensionDraft, Extension, InventoryEntryDraft, InventoryEntry, MyCustomerChangePassword, MyCustomerEmailVerify, MyOrderFromCartDraft, OrderEditDraft, OrderEdit, PaymentDraft, Payment, ProductSearchRequest, ProductPagedSearchResponse, Product, ProductProjection, ProductDraft, ProductDiscountDraft, ProductDiscount, ProductProjectionPagedSearchResponse, FacetResults, TermFacetResult, FilteredFacetResult, RangeFacetResult, ProductSelectionDraft, ProductSelection, ProductTypeDraft, ProductType, QuoteDraft, Quote, StagedQuoteDraft, StagedQuote, ReviewDraft, Review, ShippingMethodDraft, ShippingMethod, ZoneReference, ShoppingListDraft, ShoppingList, ShoppingListLineItem, StandalonePriceDraft, StandalonePrice, ChannelResourceIdentifier, ChannelReference, StateDraft, State, StoreDraft, Store, SubscriptionDraft, Subscription, TaxCategoryDraft, TaxCategory, TypeDraft, Type, ZoneDraft, Zone, ResourceIdentifier } from '@commercetools/platform-sdk';
1
+ import * as _1 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/msw@2.7.3_@types+node@20.16.14_typescript@5.8.3/node_modules/msw/lib/core/index.mjs";
2
+ import express from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/express@5.1.0/node_modules/express/index.js";
3
+ import { SetupServer, SetupServerApi } from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/msw@2.7.3_@types+node@20.16.14_typescript@5.8.3/node_modules/msw/lib/node/index.mjs";
4
+ import * as _3 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
5
+ import * as _4 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
6
+ import * as _5 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
7
+ import * as _9 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
8
+ import * as _10 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
9
+ import * as _11 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
10
+ import * as _12 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
11
+ import * as _13 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
12
+ import * as _15 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
13
+ import * as _17 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
14
+ import * as _18 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
15
+ import * as _19 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
16
+ import * as _21 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
17
+ import * as _24 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
18
+ import * as _25 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
19
+ import * as _27 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
20
+ import * as _28 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
21
+ import * as _29 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
22
+ import * as _33 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
23
+ import * as _34 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
24
+ import * as _35 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
25
+ import * as _36 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
26
+ import * as _37 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
27
+ import * as _39 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
28
+ import * as _41 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
29
+ import * as _42 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
30
+ import * as _43 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
31
+ import * as _45 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
32
+ import * as _47 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
33
+ import * as _49 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
34
+ import * as _50 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
35
+ import * as _52 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
36
+ import * as _53 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
37
+ import * as _54 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
38
+ import * as _58 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
39
+ import * as _59 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
40
+ import * as _60 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
41
+ import * as _61 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
42
+ import * as _62 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
43
+ import * as _64 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
44
+ import * as _66 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
45
+ import * as _67 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
46
+ import * as _68 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
47
+ import * as _70 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
48
+ import * as _72 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
49
+ import * as _74 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
50
+ import * as _75 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
51
+ import * as _77 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
52
+ import * as _78 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
53
+ import * as _79 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
54
+ import * as _80 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
55
+ import * as _81 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
56
+ import * as _82 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
57
+ import * as _83 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
58
+ import * as _84 from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
59
+ import * as ctp from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
60
+ import { Address, AssociateRole, AssociateRoleDraft, AttributeGroup, AttributeGroupDraft, BaseResource, BusinessUnit, BusinessUnitDraft, Cart, CartDiscount, CartDiscountDraft, CartDraft, CartReference, Category, CategoryDraft, Channel, ChannelDraft, ChannelReference, ChannelResourceIdentifier, CustomObject, CustomObjectDraft, Customer, CustomerCreatePasswordResetToken, CustomerDraft, CustomerGroup, CustomerGroupDraft, CustomerResetPassword, CustomerToken, DiscountCode, DiscountCodeDraft, Extension, ExtensionDraft, FacetResults, FilteredFacetResult, InventoryEntry, InventoryEntryDraft, LineItem, LineItemDraft, MyCustomerChangePassword, MyCustomerEmailVerify, MyCustomerResetPassword, MyOrderFromCartDraft, MyQuoteRequestDraft, Order, OrderEdit, OrderEditDraft, OrderFromCartDraft, OrderImportDraft, Payment, PaymentDraft, Product, ProductDiscount, ProductDiscountDraft, ProductDraft, ProductPagedSearchResponse, ProductProjection, ProductProjectionPagedSearchResponse, ProductSearchRequest, ProductSelection, ProductSelectionDraft, ProductTailoring, ProductType, ProductTypeDraft, Project, QueryParam, Quote, QuoteDraft, QuoteRequest, QuoteRequestDraft, RangeFacetResult, ResourceIdentifier, Review, ReviewDraft, ShippingMethod, ShippingMethodDraft, ShoppingList, ShoppingListDraft, ShoppingListLineItem, StagedQuote, StagedQuoteDraft, StandalonePrice, StandalonePriceDraft, State, StateDraft, Store, StoreDraft, StoreKeyReference, Subscription, SubscriptionDraft, TaxCategory, TaxCategoryDraft, TermFacetResult, Type, TypeDraft, UpdateAction, Zone, ZoneDraft, ZoneReference } from "/home/runner/work/commercetools-node-mock/commercetools-node-mock/node_modules/.pnpm/@commercetools+platform-sdk@8.8.0/node_modules/@commercetools/platform-sdk/dist/commercetools-platform-sdk.cjs.js";
61
+ import "node:http";
62
+ import "qs";
6
63
 
64
+ //#region src/oauth/store.d.ts
7
65
  type Token = {
66
+ access_token: string;
67
+ token_type: "Bearer";
68
+ expires_in: number;
69
+ scope: string;
70
+ refresh_token?: string;
71
+ };
72
+ declare class OAuth2Store {
73
+ tokens: Token[];
74
+ validate: boolean;
75
+ constructor(validate?: boolean);
76
+ addToken(token: Token): void;
77
+ getClientToken(clientId: string, clientSecret: string, scope?: string): Token;
78
+ getAnonymousToken(projectKey: string, anonymousId: string | undefined, scope: string): Token;
79
+ getCustomerToken(projectKey: string, customerId: string, scope: string): Token;
80
+ refreshToken(clientId: string, clientSecret: string, refreshToken: string): {
8
81
  access_token: string;
9
82
  token_type: "Bearer";
10
83
  expires_in: number;
11
84
  scope: string;
12
- refresh_token?: string;
13
- };
14
- declare class OAuth2Store {
15
- tokens: Token[];
16
- validate: boolean;
17
- constructor(validate?: boolean);
18
- addToken(token: Token): void;
19
- getClientToken(clientId: string, clientSecret: string, scope?: string): Token;
20
- getAnonymousToken(projectKey: string, anonymousId: string | undefined, scope: string): Token;
21
- getCustomerToken(projectKey: string, customerId: string, scope: string): Token;
22
- refreshToken(clientId: string, clientSecret: string, refreshToken: string): {
23
- access_token: string;
24
- token_type: "Bearer";
25
- expires_in: number;
26
- scope: string;
27
- } | undefined;
28
- validateToken(token: string): boolean;
85
+ } | undefined;
86
+ validateToken(token: string): boolean;
29
87
  }
30
88
 
89
+ //#endregion
90
+ //#region src/repositories/abstract.d.ts
31
91
  type QueryParams$1 = {
32
- expand?: string[];
33
- where?: string[];
34
- offset?: number;
35
- limit?: number;
36
- [key: string]: QueryParam;
92
+ expand?: string[];
93
+ where?: string[];
94
+ offset?: number;
95
+ limit?: number;
96
+ [key: string]: QueryParam;
37
97
  };
38
98
  type GetParams$1 = {
39
- expand?: string[];
99
+ expand?: string[];
40
100
  };
41
101
  type RepositoryContext = {
42
- projectKey: string;
43
- storeKey?: string;
102
+ projectKey: string;
103
+ storeKey?: string;
44
104
  };
45
105
  declare abstract class AbstractRepository<R extends BaseResource | Project> {
46
- protected _storage: AbstractStorage;
47
- protected config: Config;
48
- protected actions: AbstractUpdateHandler | undefined;
49
- constructor(config: Config);
50
- abstract saveNew({ projectKey }: RepositoryContext, resource: R): void;
51
- abstract saveUpdate({ projectKey }: RepositoryContext, version: number, resource: R): void;
52
- abstract postProcessResource(context: RepositoryContext, resource: any): any;
53
- processUpdateActions(context: RepositoryContext, resource: R, version: number, actions: UpdateAction[]): R;
106
+ protected _storage: AbstractStorage;
107
+ protected config: Config;
108
+ protected actions: AbstractUpdateHandler | undefined;
109
+ constructor(config: Config);
110
+ abstract saveNew({
111
+ projectKey
112
+ }: RepositoryContext, resource: R): void;
113
+ abstract saveUpdate({
114
+ projectKey
115
+ }: RepositoryContext, version: number, resource: R): void;
116
+ abstract postProcessResource(context: RepositoryContext, resource: any): any;
117
+ processUpdateActions(context: RepositoryContext, resource: R, version: number, actions: UpdateAction[]): R;
54
118
  }
55
119
  declare abstract class AbstractResourceRepository<T extends ResourceType> extends AbstractRepository<ResourceMap[T]> {
56
- protected _typeId: T;
57
- constructor(typeId: T, config: Config);
58
- abstract create(context: RepositoryContext, draft: any): ResourceMap[T];
59
- protected getTypeId(): T;
60
- delete(context: RepositoryContext, id: string, params?: GetParams$1): ResourceMap[T] | null;
61
- get(context: RepositoryContext, id: string, params?: GetParams$1): ResourceMap[T] | null;
62
- getByKey(context: RepositoryContext, key: string, params?: GetParams$1): ResourceMap[T] | null;
63
- postProcessResource(context: RepositoryContext, resource: ResourceMap[T], params?: GetParams$1): ResourceMap[T];
64
- query(context: RepositoryContext, params?: QueryParams$1): PagedQueryResponseMap[T] & {
65
- results: ResourceMap[T][];
66
- };
67
- saveNew(context: RepositoryContext, resource: ShallowWritable<ResourceMap[T]>): ResourceMap[T];
68
- saveUpdate(context: RepositoryContext, version: number, resource: ShallowWritable<ResourceMap[T]>): ShallowWritable<ResourceMap[T]>;
120
+ protected _typeId: T;
121
+ constructor(typeId: T, config: Config);
122
+ abstract create(context: RepositoryContext, draft: any): ResourceMap[T];
123
+ protected getTypeId(): T;
124
+ delete(context: RepositoryContext, id: string, params?: GetParams$1): ResourceMap[T] | null;
125
+ get(context: RepositoryContext, id: string, params?: GetParams$1): ResourceMap[T] | null;
126
+ getByKey(context: RepositoryContext, key: string, params?: GetParams$1): ResourceMap[T] | null;
127
+ postProcessResource(context: RepositoryContext, resource: ResourceMap[T], params?: GetParams$1): ResourceMap[T];
128
+ query(context: RepositoryContext, params?: QueryParams$1): PagedQueryResponseMap[T] & {
129
+ results: ResourceMap[T][];
130
+ };
131
+ saveNew(context: RepositoryContext, resource: ShallowWritable<ResourceMap[T]>): ResourceMap[T];
132
+ saveUpdate(context: RepositoryContext, version: number, resource: ShallowWritable<ResourceMap[T]>): ShallowWritable<ResourceMap[T]>;
69
133
  }
70
134
  declare class AbstractUpdateHandler {
71
- protected _storage: AbstractStorage;
72
- constructor(_storage: AbstractStorage);
73
- apply<R extends BaseResource | Project>(context: RepositoryContext, resource: R, version: number, actions: UpdateAction[]): R;
135
+ protected _storage: AbstractStorage;
136
+ constructor(_storage: AbstractStorage);
137
+ apply<R extends BaseResource | Project>(context: RepositoryContext, resource: R, version: number, actions: UpdateAction[]): R;
74
138
  }
75
139
 
140
+ //#endregion
141
+ //#region src/repositories/product-tailoring.d.ts
76
142
  declare class ProductTailoringRepository extends AbstractResourceRepository<"product-tailoring"> {
77
- constructor(config: Config);
78
- create(context: RepositoryContext, draft: any): ProductTailoring;
143
+ constructor(config: Config);
144
+ create(context: RepositoryContext, draft: any): ProductTailoring;
79
145
  }
80
146
 
147
+ //#endregion
148
+ //#region src/repositories/cart/index.d.ts
81
149
  declare class CartRepository extends AbstractResourceRepository<"cart"> {
82
- constructor(config: Config);
83
- create(context: RepositoryContext, draft: CartDraft): Cart;
84
- getActiveCart(projectKey: string): Cart | undefined;
85
- draftLineItemtoLineItem: (projectKey: string, draftLineItem: LineItemDraft, currency: string, country: string | undefined) => LineItem;
150
+ constructor(config: Config);
151
+ create(context: RepositoryContext, draft: CartDraft): Cart;
152
+ getActiveCart(projectKey: string): Cart | undefined;
153
+ draftLineItemtoLineItem: (projectKey: string, draftLineItem: LineItemDraft, currency: string, country: string | undefined) => LineItem;
86
154
  }
87
155
 
156
+ //#endregion
157
+ //#region src/repositories/order/index.d.ts
88
158
  declare class OrderRepository extends AbstractResourceRepository<"order"> {
89
- constructor(config: Config);
90
- create(context: RepositoryContext, draft: OrderFromCartDraft): Order;
91
- createFromCart(context: RepositoryContext, cartReference: CartReference, orderNumber?: string): Order;
92
- import(context: RepositoryContext, draft: OrderImportDraft): Order;
93
- private lineItemFromImportDraft;
94
- private customLineItemFromImportDraft;
95
- getWithOrderNumber(context: RepositoryContext, orderNumber: string, params?: QueryParams$1): Order | undefined;
159
+ constructor(config: Config);
160
+ create(context: RepositoryContext, draft: OrderFromCartDraft): Order;
161
+ createFromCart(context: RepositoryContext, cartReference: CartReference, orderNumber?: string): Order;
162
+ import(context: RepositoryContext, draft: OrderImportDraft): Order;
163
+ private lineItemFromImportDraft;
164
+ private customLineItemFromImportDraft;
165
+ getWithOrderNumber(context: RepositoryContext, orderNumber: string, params?: QueryParams$1): Order | undefined;
96
166
  }
97
167
 
168
+ //#endregion
169
+ //#region src/repositories/quote-request/index.d.ts
98
170
  declare class QuoteRequestRepository extends AbstractResourceRepository<"quote-request"> {
99
- constructor(config: Config);
100
- create(context: RepositoryContext, draft: QuoteRequestDraft | MyQuoteRequestDraft): QuoteRequest;
101
- createFromCart(context: RepositoryContext, cartReference: CartReference): QuoteRequest;
171
+ constructor(config: Config);
172
+ create(context: RepositoryContext, draft: QuoteRequestDraft | MyQuoteRequestDraft): QuoteRequest;
173
+ createFromCart(context: RepositoryContext, cartReference: CartReference): QuoteRequest;
102
174
  }
103
175
 
104
- declare class AsAssociateOrderRepository extends OrderRepository {
105
- }
106
- declare class AsAssociateCartRepository extends CartRepository {
107
- }
108
- declare class AsAssociateQuoteRequestRepository extends QuoteRequestRepository {
109
- }
176
+ //#endregion
177
+ //#region src/repositories/as-associate.d.ts
178
+ declare class AsAssociateOrderRepository extends OrderRepository {}
179
+ declare class AsAssociateCartRepository extends CartRepository {}
180
+ declare class AsAssociateQuoteRequestRepository extends QuoteRequestRepository {}
110
181
 
182
+ //#endregion
183
+ //#region src/repositories/associate-role.d.ts
111
184
  declare class AssociateRoleRepository extends AbstractResourceRepository<"associate-role"> {
112
- constructor(config: Config);
113
- create(context: RepositoryContext, draft: AssociateRoleDraft): AssociateRole;
185
+ constructor(config: Config);
186
+ create(context: RepositoryContext, draft: AssociateRoleDraft): AssociateRole;
114
187
  }
115
188
 
189
+ //#endregion
190
+ //#region src/repositories/attribute-group.d.ts
116
191
  declare class AttributeGroupRepository extends AbstractResourceRepository<"attribute-group"> {
117
- constructor(config: Config);
118
- create(context: RepositoryContext, draft: AttributeGroupDraft): AttributeGroup;
192
+ constructor(config: Config);
193
+ create(context: RepositoryContext, draft: AttributeGroupDraft): AttributeGroup;
119
194
  }
120
195
 
196
+ //#endregion
197
+ //#region src/repositories/business-unit.d.ts
121
198
  declare class BusinessUnitRepository extends AbstractResourceRepository<"business-unit"> {
122
- constructor(config: Config);
123
- create(context: RepositoryContext, draft: BusinessUnitDraft): BusinessUnit;
124
- private _isCompanyDraft;
125
- private _isDivisionDraft;
199
+ constructor(config: Config);
200
+ create(context: RepositoryContext, draft: BusinessUnitDraft): BusinessUnit;
201
+ private _isCompanyDraft;
202
+ private _isDivisionDraft;
126
203
  }
127
204
 
205
+ //#endregion
206
+ //#region src/repositories/cart-discount/index.d.ts
128
207
  declare class CartDiscountRepository extends AbstractResourceRepository<"cart-discount"> {
129
- constructor(config: Config);
130
- create(context: RepositoryContext, draft: CartDiscountDraft): CartDiscount;
131
- private transformValueDraft;
208
+ constructor(config: Config);
209
+ create(context: RepositoryContext, draft: CartDiscountDraft): CartDiscount;
210
+ private transformValueDraft;
132
211
  }
133
212
 
213
+ //#endregion
214
+ //#region src/repositories/category/index.d.ts
134
215
  declare class CategoryRepository extends AbstractResourceRepository<"category"> {
135
- constructor(config: Config);
136
- create(context: RepositoryContext, draft: CategoryDraft): Category;
137
- postProcessResource(context: RepositoryContext, resource: Writable<Category>, params?: GetParams$1): Category;
216
+ constructor(config: Config);
217
+ create(context: RepositoryContext, draft: CategoryDraft): Category;
218
+ postProcessResource(context: RepositoryContext, resource: Writable<Category>, params?: GetParams$1): Category;
138
219
  }
139
220
 
221
+ //#endregion
222
+ //#region src/repositories/channel.d.ts
140
223
  declare class ChannelRepository extends AbstractResourceRepository<"channel"> {
141
- constructor(config: Config);
142
- create(context: RepositoryContext, draft: ChannelDraft): Channel;
224
+ constructor(config: Config);
225
+ create(context: RepositoryContext, draft: ChannelDraft): Channel;
143
226
  }
144
227
 
228
+ //#endregion
229
+ //#region src/repositories/custom-object.d.ts
145
230
  declare class CustomObjectRepository extends AbstractResourceRepository<"key-value-document"> {
146
- constructor(config: Config);
147
- create(context: RepositoryContext, draft: Writable<CustomObjectDraft>): CustomObject;
148
- getWithContainerAndKey(context: RepositoryContext, container: string, key: string): CustomObject | undefined;
149
- queryWithContainer(context: RepositoryContext, container: string, params?: QueryParams$1): ctp.CustomObjectPagedQueryResponse;
231
+ constructor(config: Config);
232
+ create(context: RepositoryContext, draft: Writable<CustomObjectDraft>): CustomObject;
233
+ getWithContainerAndKey(context: RepositoryContext, container: string, key: string): CustomObject | undefined;
234
+ queryWithContainer(context: RepositoryContext, container: string, params?: QueryParams$1): _3.CustomObjectPagedQueryResponse;
150
235
  }
151
236
 
237
+ //#endregion
238
+ //#region src/repositories/customer/index.d.ts
152
239
  declare class CustomerRepository extends AbstractResourceRepository<"customer"> {
153
- constructor(config: Config);
154
- create(context: RepositoryContext, draft: CustomerDraft): Customer;
155
- saveUpdate(context: RepositoryContext, version: number, resource: ShallowWritable<ResourceMap["customer"]>): ShallowWritable<ResourceMap["customer"]>;
156
- passwordResetToken(context: RepositoryContext, request: CustomerCreatePasswordResetToken): CustomerToken;
157
- passwordReset(context: RepositoryContext, resetPassword: CustomerResetPassword | MyCustomerResetPassword): {
240
+ constructor(config: Config);
241
+ create(context: RepositoryContext, draft: CustomerDraft): Customer;
242
+ saveUpdate(context: RepositoryContext, version: number, resource: ShallowWritable<ResourceMap["customer"]>): ShallowWritable<ResourceMap["customer"]>;
243
+ passwordResetToken(context: RepositoryContext, request: CustomerCreatePasswordResetToken): CustomerToken;
244
+ passwordReset(context: RepositoryContext, resetPassword: CustomerResetPassword | MyCustomerResetPassword): {
245
+ id: string;
246
+ version: number;
247
+ key?: string | undefined;
248
+ customerNumber?: string | undefined;
249
+ externalId?: string | undefined;
250
+ createdAt: string;
251
+ lastModifiedAt: string;
252
+ lastModifiedBy?: {
253
+ clientId?: string | undefined;
254
+ externalUserId?: string | undefined;
255
+ customer?: {
256
+ typeId: "customer";
257
+ id: string;
258
+ obj?: /*elided*/any | undefined;
259
+ } | undefined;
260
+ anonymousId?: string | undefined;
261
+ attributedTo?: {
262
+ clientId?: string | undefined;
263
+ source: _4.AttributionSource;
264
+ } | undefined;
265
+ associate?: {
266
+ typeId: "customer";
267
+ id: string;
268
+ obj?: /*elided*/any | undefined;
269
+ } | undefined;
270
+ } | undefined;
271
+ createdBy?: {
272
+ clientId?: string | undefined;
273
+ externalUserId?: string | undefined;
274
+ customer?: {
275
+ typeId: "customer";
276
+ id: string;
277
+ obj?: /*elided*/any | undefined;
278
+ } | undefined;
279
+ anonymousId?: string | undefined;
280
+ attributedTo?: {
281
+ clientId?: string | undefined;
282
+ source: _5.AttributionSource;
283
+ } | undefined;
284
+ associate?: {
285
+ typeId: "customer";
286
+ id: string;
287
+ obj?: /*elided*/any | undefined;
288
+ } | undefined;
289
+ } | undefined;
290
+ email: string;
291
+ password?: string | undefined;
292
+ firstName?: string | undefined;
293
+ lastName?: string | undefined;
294
+ middleName?: string | undefined;
295
+ title?: string | undefined;
296
+ dateOfBirth?: string | undefined;
297
+ companyName?: string | undefined;
298
+ vatId?: string | undefined;
299
+ addresses: WritableArray<Address>;
300
+ defaultShippingAddressId?: string | undefined;
301
+ shippingAddressIds?: WritableArray<string> | undefined;
302
+ defaultBillingAddressId?: string | undefined;
303
+ billingAddressIds?: WritableArray<string> | undefined;
304
+ isEmailVerified: boolean;
305
+ customerGroup?: {
306
+ typeId: "customer-group";
307
+ id: string;
308
+ obj?: {
158
309
  id: string;
159
310
  version: number;
160
- key?: string | undefined;
161
- customerNumber?: string | undefined;
162
- externalId?: string | undefined;
163
311
  createdAt: string;
164
312
  lastModifiedAt: string;
165
313
  lastModifiedBy?: {
314
+ clientId?: string | undefined;
315
+ externalUserId?: string | undefined;
316
+ customer?: {
317
+ typeId: "customer";
318
+ id: string;
319
+ obj?: /*elided*/any | undefined;
320
+ } | undefined;
321
+ anonymousId?: string | undefined;
322
+ attributedTo?: {
323
+ clientId?: string | undefined;
324
+ source: _9.AttributionSource;
325
+ } | undefined;
326
+ associate?: {
327
+ typeId: "customer";
328
+ id: string;
329
+ obj?: /*elided*/any | undefined;
330
+ } | undefined;
331
+ } | undefined;
332
+ createdBy?: {
333
+ clientId?: string | undefined;
334
+ externalUserId?: string | undefined;
335
+ customer?: {
336
+ typeId: "customer";
337
+ id: string;
338
+ obj?: /*elided*/any | undefined;
339
+ } | undefined;
340
+ anonymousId?: string | undefined;
341
+ attributedTo?: {
342
+ clientId?: string | undefined;
343
+ source: _10.AttributionSource;
344
+ } | undefined;
345
+ associate?: {
346
+ typeId: "customer";
347
+ id: string;
348
+ obj?: /*elided*/any | undefined;
349
+ } | undefined;
350
+ } | undefined;
351
+ key?: string | undefined;
352
+ name: string;
353
+ custom?: {
354
+ type: {
355
+ typeId: "type";
356
+ id: string;
357
+ obj?: {
358
+ id: string;
359
+ version: number;
360
+ createdAt: string;
361
+ lastModifiedAt: string;
362
+ lastModifiedBy?: {
363
+ clientId?: string | undefined;
364
+ externalUserId?: string | undefined;
365
+ customer?: {
366
+ typeId: "customer";
367
+ id: string;
368
+ obj?: /*elided*/any | undefined;
369
+ } | undefined;
370
+ anonymousId?: string | undefined;
371
+ attributedTo?: {
372
+ clientId?: string | undefined;
373
+ source: _11.AttributionSource;
374
+ } | undefined;
375
+ associate?: {
376
+ typeId: "customer";
377
+ id: string;
378
+ obj?: /*elided*/any | undefined;
379
+ } | undefined;
380
+ } | undefined;
381
+ createdBy?: {
382
+ clientId?: string | undefined;
383
+ externalUserId?: string | undefined;
384
+ customer?: {
385
+ typeId: "customer";
386
+ id: string;
387
+ obj?: /*elided*/any | undefined;
388
+ } | undefined;
389
+ anonymousId?: string | undefined;
390
+ attributedTo?: {
391
+ clientId?: string | undefined;
392
+ source: _12.AttributionSource;
393
+ } | undefined;
394
+ associate?: {
395
+ typeId: "customer";
396
+ id: string;
397
+ obj?: /*elided*/any | undefined;
398
+ } | undefined;
399
+ } | undefined;
400
+ key: string;
401
+ name: {
402
+ [x: string]: string;
403
+ };
404
+ description?: {
405
+ [x: string]: string;
406
+ } | undefined;
407
+ resourceTypeIds: WritableArray<_13.ResourceTypeId>;
408
+ fieldDefinitions: WritableArray<_15.FieldDefinition>;
409
+ } | undefined;
410
+ };
411
+ fields: {
412
+ [x: string]: any;
413
+ };
414
+ } | undefined;
415
+ } | undefined;
416
+ } | undefined;
417
+ custom?: {
418
+ type: {
419
+ typeId: "type";
420
+ id: string;
421
+ obj?: {
422
+ id: string;
423
+ version: number;
424
+ createdAt: string;
425
+ lastModifiedAt: string;
426
+ lastModifiedBy?: {
166
427
  clientId?: string | undefined;
167
428
  externalUserId?: string | undefined;
168
429
  customer?: {
169
- typeId: "customer";
170
- id: string;
171
- obj?: /*elided*/ any | undefined;
430
+ typeId: "customer";
431
+ id: string;
432
+ obj?: /*elided*/any | undefined;
172
433
  } | undefined;
173
434
  anonymousId?: string | undefined;
174
435
  attributedTo?: {
175
- clientId?: string | undefined;
176
- source: ctp.AttributionSource;
436
+ clientId?: string | undefined;
437
+ source: _17.AttributionSource;
177
438
  } | undefined;
178
439
  associate?: {
179
- typeId: "customer";
180
- id: string;
181
- obj?: /*elided*/ any | undefined;
440
+ typeId: "customer";
441
+ id: string;
442
+ obj?: /*elided*/any | undefined;
182
443
  } | undefined;
183
- } | undefined;
184
- createdBy?: {
444
+ } | undefined;
445
+ createdBy?: {
185
446
  clientId?: string | undefined;
186
447
  externalUserId?: string | undefined;
187
448
  customer?: {
188
- typeId: "customer";
189
- id: string;
190
- obj?: /*elided*/ any | undefined;
449
+ typeId: "customer";
450
+ id: string;
451
+ obj?: /*elided*/any | undefined;
191
452
  } | undefined;
192
453
  anonymousId?: string | undefined;
193
454
  attributedTo?: {
194
- clientId?: string | undefined;
195
- source: ctp.AttributionSource;
455
+ clientId?: string | undefined;
456
+ source: _18.AttributionSource;
196
457
  } | undefined;
197
458
  associate?: {
198
- typeId: "customer";
199
- id: string;
200
- obj?: /*elided*/ any | undefined;
201
- } | undefined;
202
- } | undefined;
203
- email: string;
204
- password?: string | undefined;
205
- firstName?: string | undefined;
206
- lastName?: string | undefined;
207
- middleName?: string | undefined;
208
- title?: string | undefined;
209
- dateOfBirth?: string | undefined;
210
- companyName?: string | undefined;
211
- vatId?: string | undefined;
212
- addresses: WritableArray<Address>;
213
- defaultShippingAddressId?: string | undefined;
214
- shippingAddressIds?: WritableArray<string> | undefined;
215
- defaultBillingAddressId?: string | undefined;
216
- billingAddressIds?: WritableArray<string> | undefined;
217
- isEmailVerified: boolean;
218
- customerGroup?: {
219
- typeId: "customer-group";
220
- id: string;
221
- obj?: {
222
- id: string;
223
- version: number;
224
- createdAt: string;
225
- lastModifiedAt: string;
226
- lastModifiedBy?: {
227
- clientId?: string | undefined;
228
- externalUserId?: string | undefined;
229
- customer?: {
230
- typeId: "customer";
231
- id: string;
232
- obj?: /*elided*/ any | undefined;
233
- } | undefined;
234
- anonymousId?: string | undefined;
235
- attributedTo?: {
236
- clientId?: string | undefined;
237
- source: ctp.AttributionSource;
238
- } | undefined;
239
- associate?: {
240
- typeId: "customer";
241
- id: string;
242
- obj?: /*elided*/ any | undefined;
243
- } | undefined;
244
- } | undefined;
245
- createdBy?: {
246
- clientId?: string | undefined;
247
- externalUserId?: string | undefined;
248
- customer?: {
249
- typeId: "customer";
250
- id: string;
251
- obj?: /*elided*/ any | undefined;
252
- } | undefined;
253
- anonymousId?: string | undefined;
254
- attributedTo?: {
255
- clientId?: string | undefined;
256
- source: ctp.AttributionSource;
257
- } | undefined;
258
- associate?: {
259
- typeId: "customer";
260
- id: string;
261
- obj?: /*elided*/ any | undefined;
262
- } | undefined;
263
- } | undefined;
264
- key?: string | undefined;
265
- name: string;
266
- custom?: {
267
- type: {
268
- typeId: "type";
269
- id: string;
270
- obj?: {
271
- id: string;
272
- version: number;
273
- createdAt: string;
274
- lastModifiedAt: string;
275
- lastModifiedBy?: {
276
- clientId?: string | undefined;
277
- externalUserId?: string | undefined;
278
- customer?: {
279
- typeId: "customer";
280
- id: string;
281
- obj?: /*elided*/ any | undefined;
282
- } | undefined;
283
- anonymousId?: string | undefined;
284
- attributedTo?: {
285
- clientId?: string | undefined;
286
- source: ctp.AttributionSource;
287
- } | undefined;
288
- associate?: {
289
- typeId: "customer";
290
- id: string;
291
- obj?: /*elided*/ any | undefined;
292
- } | undefined;
293
- } | undefined;
294
- createdBy?: {
295
- clientId?: string | undefined;
296
- externalUserId?: string | undefined;
297
- customer?: {
298
- typeId: "customer";
299
- id: string;
300
- obj?: /*elided*/ any | undefined;
301
- } | undefined;
302
- anonymousId?: string | undefined;
303
- attributedTo?: {
304
- clientId?: string | undefined;
305
- source: ctp.AttributionSource;
306
- } | undefined;
307
- associate?: {
308
- typeId: "customer";
309
- id: string;
310
- obj?: /*elided*/ any | undefined;
311
- } | undefined;
312
- } | undefined;
313
- key: string;
314
- name: {
315
- [x: string]: string;
316
- };
317
- description?: {
318
- [x: string]: string;
319
- } | undefined;
320
- resourceTypeIds: WritableArray<ctp.ResourceTypeId>;
321
- fieldDefinitions: WritableArray<ctp.FieldDefinition>;
322
- } | undefined;
323
- };
324
- fields: {
325
- [x: string]: any;
326
- };
327
- } | undefined;
459
+ typeId: "customer";
460
+ id: string;
461
+ obj?: /*elided*/any | undefined;
328
462
  } | undefined;
463
+ } | undefined;
464
+ key: string;
465
+ name: {
466
+ [x: string]: string;
467
+ };
468
+ description?: {
469
+ [x: string]: string;
470
+ } | undefined;
471
+ resourceTypeIds: WritableArray<_19.ResourceTypeId>;
472
+ fieldDefinitions: WritableArray<_21.FieldDefinition>;
329
473
  } | undefined;
330
- custom?: {
331
- type: {
332
- typeId: "type";
333
- id: string;
334
- obj?: {
335
- id: string;
336
- version: number;
337
- createdAt: string;
338
- lastModifiedAt: string;
339
- lastModifiedBy?: {
340
- clientId?: string | undefined;
341
- externalUserId?: string | undefined;
342
- customer?: {
343
- typeId: "customer";
344
- id: string;
345
- obj?: /*elided*/ any | undefined;
346
- } | undefined;
347
- anonymousId?: string | undefined;
348
- attributedTo?: {
349
- clientId?: string | undefined;
350
- source: ctp.AttributionSource;
351
- } | undefined;
352
- associate?: {
353
- typeId: "customer";
354
- id: string;
355
- obj?: /*elided*/ any | undefined;
356
- } | undefined;
357
- } | undefined;
358
- createdBy?: {
359
- clientId?: string | undefined;
360
- externalUserId?: string | undefined;
361
- customer?: {
362
- typeId: "customer";
363
- id: string;
364
- obj?: /*elided*/ any | undefined;
365
- } | undefined;
366
- anonymousId?: string | undefined;
367
- attributedTo?: {
368
- clientId?: string | undefined;
369
- source: ctp.AttributionSource;
370
- } | undefined;
371
- associate?: {
372
- typeId: "customer";
373
- id: string;
374
- obj?: /*elided*/ any | undefined;
375
- } | undefined;
376
- } | undefined;
377
- key: string;
378
- name: {
379
- [x: string]: string;
380
- };
381
- description?: {
382
- [x: string]: string;
383
- } | undefined;
384
- resourceTypeIds: WritableArray<ctp.ResourceTypeId>;
385
- fieldDefinitions: WritableArray<ctp.FieldDefinition>;
386
- } | undefined;
387
- };
388
- fields: {
389
- [x: string]: any;
390
- };
391
- } | undefined;
392
- locale?: string | undefined;
393
- salutation?: string | undefined;
394
- stores: WritableArray<StoreKeyReference>;
395
- authenticationMode: ctp.AuthenticationMode;
396
- customerGroupAssignments?: WritableArray<ctp.CustomerGroupAssignment> | undefined;
397
- };
398
- verifyEmailToken(context: RepositoryContext, id: string): CustomerToken;
399
- private storeReferenceToStoreKeyReference;
474
+ };
475
+ fields: {
476
+ [x: string]: any;
477
+ };
478
+ } | undefined;
479
+ locale?: string | undefined;
480
+ salutation?: string | undefined;
481
+ stores: WritableArray<StoreKeyReference>;
482
+ authenticationMode: _24.AuthenticationMode;
483
+ customerGroupAssignments?: WritableArray<_25.CustomerGroupAssignment> | undefined;
484
+ };
485
+ verifyEmailToken(context: RepositoryContext, id: string): CustomerToken;
486
+ private storeReferenceToStoreKeyReference;
400
487
  }
401
488
 
489
+ //#endregion
490
+ //#region src/repositories/customer-group.d.ts
402
491
  declare class CustomerGroupRepository extends AbstractResourceRepository<"customer-group"> {
403
- constructor(config: Config);
404
- create(context: RepositoryContext, draft: CustomerGroupDraft): CustomerGroup;
492
+ constructor(config: Config);
493
+ create(context: RepositoryContext, draft: CustomerGroupDraft): CustomerGroup;
405
494
  }
406
495
 
496
+ //#endregion
497
+ //#region src/repositories/discount-code/index.d.ts
407
498
  declare class DiscountCodeRepository extends AbstractResourceRepository<"discount-code"> {
408
- constructor(config: Config);
409
- create(context: RepositoryContext, draft: DiscountCodeDraft): DiscountCode;
499
+ constructor(config: Config);
500
+ create(context: RepositoryContext, draft: DiscountCodeDraft): DiscountCode;
410
501
  }
411
502
 
503
+ //#endregion
504
+ //#region src/repositories/extension.d.ts
412
505
  declare class ExtensionRepository extends AbstractResourceRepository<"extension"> {
413
- constructor(config: Config);
414
- create(context: RepositoryContext, draft: ExtensionDraft): Extension;
415
- postProcessResource(context: RepositoryContext, resource: Extension): Extension;
506
+ constructor(config: Config);
507
+ create(context: RepositoryContext, draft: ExtensionDraft): Extension;
508
+ postProcessResource(context: RepositoryContext, resource: Extension): Extension;
416
509
  }
417
510
 
511
+ //#endregion
512
+ //#region src/repositories/inventory-entry/index.d.ts
418
513
  declare class InventoryEntryRepository extends AbstractResourceRepository<"inventory-entry"> {
419
- constructor(config: Config);
420
- create(context: RepositoryContext, draft: InventoryEntryDraft): InventoryEntry;
514
+ constructor(config: Config);
515
+ create(context: RepositoryContext, draft: InventoryEntryDraft): InventoryEntry;
421
516
  }
422
517
 
518
+ //#endregion
519
+ //#region src/repositories/my-customer.d.ts
423
520
  declare class MyCustomerRepository extends CustomerRepository {
424
- changePassword(context: RepositoryContext, changePassword: MyCustomerChangePassword): {
521
+ changePassword(context: RepositoryContext, changePassword: MyCustomerChangePassword): {
522
+ id: string;
523
+ version: number;
524
+ key?: string | undefined;
525
+ customerNumber?: string | undefined;
526
+ externalId?: string | undefined;
527
+ createdAt: string;
528
+ lastModifiedAt: string;
529
+ lastModifiedBy?: {
530
+ clientId?: string | undefined;
531
+ externalUserId?: string | undefined;
532
+ customer?: {
533
+ typeId: "customer";
534
+ id: string;
535
+ obj?: /*elided*/any | undefined;
536
+ } | undefined;
537
+ anonymousId?: string | undefined;
538
+ attributedTo?: {
539
+ clientId?: string | undefined;
540
+ source: _27.AttributionSource;
541
+ } | undefined;
542
+ associate?: {
543
+ typeId: "customer";
544
+ id: string;
545
+ obj?: /*elided*/any | undefined;
546
+ } | undefined;
547
+ } | undefined;
548
+ createdBy?: {
549
+ clientId?: string | undefined;
550
+ externalUserId?: string | undefined;
551
+ customer?: {
552
+ typeId: "customer";
553
+ id: string;
554
+ obj?: /*elided*/any | undefined;
555
+ } | undefined;
556
+ anonymousId?: string | undefined;
557
+ attributedTo?: {
558
+ clientId?: string | undefined;
559
+ source: _28.AttributionSource;
560
+ } | undefined;
561
+ associate?: {
562
+ typeId: "customer";
563
+ id: string;
564
+ obj?: /*elided*/any | undefined;
565
+ } | undefined;
566
+ } | undefined;
567
+ email: string;
568
+ password?: string | undefined;
569
+ firstName?: string | undefined;
570
+ lastName?: string | undefined;
571
+ middleName?: string | undefined;
572
+ title?: string | undefined;
573
+ dateOfBirth?: string | undefined;
574
+ companyName?: string | undefined;
575
+ vatId?: string | undefined;
576
+ addresses: WritableArray<_29.Address>;
577
+ defaultShippingAddressId?: string | undefined;
578
+ shippingAddressIds?: WritableArray<string> | undefined;
579
+ defaultBillingAddressId?: string | undefined;
580
+ billingAddressIds?: WritableArray<string> | undefined;
581
+ isEmailVerified: boolean;
582
+ customerGroup?: {
583
+ typeId: "customer-group";
584
+ id: string;
585
+ obj?: {
425
586
  id: string;
426
587
  version: number;
427
- key?: string | undefined;
428
- customerNumber?: string | undefined;
429
- externalId?: string | undefined;
430
588
  createdAt: string;
431
589
  lastModifiedAt: string;
432
590
  lastModifiedBy?: {
591
+ clientId?: string | undefined;
592
+ externalUserId?: string | undefined;
593
+ customer?: {
594
+ typeId: "customer";
595
+ id: string;
596
+ obj?: /*elided*/any | undefined;
597
+ } | undefined;
598
+ anonymousId?: string | undefined;
599
+ attributedTo?: {
600
+ clientId?: string | undefined;
601
+ source: _33.AttributionSource;
602
+ } | undefined;
603
+ associate?: {
604
+ typeId: "customer";
605
+ id: string;
606
+ obj?: /*elided*/any | undefined;
607
+ } | undefined;
608
+ } | undefined;
609
+ createdBy?: {
610
+ clientId?: string | undefined;
611
+ externalUserId?: string | undefined;
612
+ customer?: {
613
+ typeId: "customer";
614
+ id: string;
615
+ obj?: /*elided*/any | undefined;
616
+ } | undefined;
617
+ anonymousId?: string | undefined;
618
+ attributedTo?: {
619
+ clientId?: string | undefined;
620
+ source: _34.AttributionSource;
621
+ } | undefined;
622
+ associate?: {
623
+ typeId: "customer";
624
+ id: string;
625
+ obj?: /*elided*/any | undefined;
626
+ } | undefined;
627
+ } | undefined;
628
+ key?: string | undefined;
629
+ name: string;
630
+ custom?: {
631
+ type: {
632
+ typeId: "type";
633
+ id: string;
634
+ obj?: {
635
+ id: string;
636
+ version: number;
637
+ createdAt: string;
638
+ lastModifiedAt: string;
639
+ lastModifiedBy?: {
640
+ clientId?: string | undefined;
641
+ externalUserId?: string | undefined;
642
+ customer?: {
643
+ typeId: "customer";
644
+ id: string;
645
+ obj?: /*elided*/any | undefined;
646
+ } | undefined;
647
+ anonymousId?: string | undefined;
648
+ attributedTo?: {
649
+ clientId?: string | undefined;
650
+ source: _35.AttributionSource;
651
+ } | undefined;
652
+ associate?: {
653
+ typeId: "customer";
654
+ id: string;
655
+ obj?: /*elided*/any | undefined;
656
+ } | undefined;
657
+ } | undefined;
658
+ createdBy?: {
659
+ clientId?: string | undefined;
660
+ externalUserId?: string | undefined;
661
+ customer?: {
662
+ typeId: "customer";
663
+ id: string;
664
+ obj?: /*elided*/any | undefined;
665
+ } | undefined;
666
+ anonymousId?: string | undefined;
667
+ attributedTo?: {
668
+ clientId?: string | undefined;
669
+ source: _36.AttributionSource;
670
+ } | undefined;
671
+ associate?: {
672
+ typeId: "customer";
673
+ id: string;
674
+ obj?: /*elided*/any | undefined;
675
+ } | undefined;
676
+ } | undefined;
677
+ key: string;
678
+ name: {
679
+ [x: string]: string;
680
+ };
681
+ description?: {
682
+ [x: string]: string;
683
+ } | undefined;
684
+ resourceTypeIds: WritableArray<_37.ResourceTypeId>;
685
+ fieldDefinitions: WritableArray<_39.FieldDefinition>;
686
+ } | undefined;
687
+ };
688
+ fields: {
689
+ [x: string]: any;
690
+ };
691
+ } | undefined;
692
+ } | undefined;
693
+ } | undefined;
694
+ custom?: {
695
+ type: {
696
+ typeId: "type";
697
+ id: string;
698
+ obj?: {
699
+ id: string;
700
+ version: number;
701
+ createdAt: string;
702
+ lastModifiedAt: string;
703
+ lastModifiedBy?: {
433
704
  clientId?: string | undefined;
434
705
  externalUserId?: string | undefined;
435
706
  customer?: {
436
- typeId: "customer";
437
- id: string;
438
- obj?: /*elided*/ any | undefined;
707
+ typeId: "customer";
708
+ id: string;
709
+ obj?: /*elided*/any | undefined;
439
710
  } | undefined;
440
711
  anonymousId?: string | undefined;
441
712
  attributedTo?: {
442
- clientId?: string | undefined;
443
- source: ctp.AttributionSource;
713
+ clientId?: string | undefined;
714
+ source: _41.AttributionSource;
444
715
  } | undefined;
445
716
  associate?: {
446
- typeId: "customer";
447
- id: string;
448
- obj?: /*elided*/ any | undefined;
717
+ typeId: "customer";
718
+ id: string;
719
+ obj?: /*elided*/any | undefined;
449
720
  } | undefined;
450
- } | undefined;
451
- createdBy?: {
721
+ } | undefined;
722
+ createdBy?: {
452
723
  clientId?: string | undefined;
453
724
  externalUserId?: string | undefined;
454
725
  customer?: {
455
- typeId: "customer";
456
- id: string;
457
- obj?: /*elided*/ any | undefined;
726
+ typeId: "customer";
727
+ id: string;
728
+ obj?: /*elided*/any | undefined;
458
729
  } | undefined;
459
730
  anonymousId?: string | undefined;
460
731
  attributedTo?: {
461
- clientId?: string | undefined;
462
- source: ctp.AttributionSource;
732
+ clientId?: string | undefined;
733
+ source: _42.AttributionSource;
463
734
  } | undefined;
464
735
  associate?: {
465
- typeId: "customer";
466
- id: string;
467
- obj?: /*elided*/ any | undefined;
736
+ typeId: "customer";
737
+ id: string;
738
+ obj?: /*elided*/any | undefined;
468
739
  } | undefined;
740
+ } | undefined;
741
+ key: string;
742
+ name: {
743
+ [x: string]: string;
744
+ };
745
+ description?: {
746
+ [x: string]: string;
747
+ } | undefined;
748
+ resourceTypeIds: WritableArray<_43.ResourceTypeId>;
749
+ fieldDefinitions: WritableArray<_45.FieldDefinition>;
750
+ } | undefined;
751
+ };
752
+ fields: {
753
+ [x: string]: any;
754
+ };
755
+ } | undefined;
756
+ locale?: string | undefined;
757
+ salutation?: string | undefined;
758
+ stores: WritableArray<_47.StoreKeyReference>;
759
+ authenticationMode: _49.AuthenticationMode;
760
+ customerGroupAssignments?: WritableArray<_50.CustomerGroupAssignment> | undefined;
761
+ };
762
+ confirmEmail(context: RepositoryContext, resetPassword: MyCustomerEmailVerify): {
763
+ id: string;
764
+ version: number;
765
+ key?: string | undefined;
766
+ customerNumber?: string | undefined;
767
+ externalId?: string | undefined;
768
+ createdAt: string;
769
+ lastModifiedAt: string;
770
+ lastModifiedBy?: {
771
+ clientId?: string | undefined;
772
+ externalUserId?: string | undefined;
773
+ customer?: {
774
+ typeId: "customer";
775
+ id: string;
776
+ obj?: /*elided*/any | undefined;
777
+ } | undefined;
778
+ anonymousId?: string | undefined;
779
+ attributedTo?: {
780
+ clientId?: string | undefined;
781
+ source: _52.AttributionSource;
782
+ } | undefined;
783
+ associate?: {
784
+ typeId: "customer";
785
+ id: string;
786
+ obj?: /*elided*/any | undefined;
787
+ } | undefined;
788
+ } | undefined;
789
+ createdBy?: {
790
+ clientId?: string | undefined;
791
+ externalUserId?: string | undefined;
792
+ customer?: {
793
+ typeId: "customer";
794
+ id: string;
795
+ obj?: /*elided*/any | undefined;
796
+ } | undefined;
797
+ anonymousId?: string | undefined;
798
+ attributedTo?: {
799
+ clientId?: string | undefined;
800
+ source: _53.AttributionSource;
801
+ } | undefined;
802
+ associate?: {
803
+ typeId: "customer";
804
+ id: string;
805
+ obj?: /*elided*/any | undefined;
806
+ } | undefined;
807
+ } | undefined;
808
+ email: string;
809
+ password?: string | undefined;
810
+ firstName?: string | undefined;
811
+ lastName?: string | undefined;
812
+ middleName?: string | undefined;
813
+ title?: string | undefined;
814
+ dateOfBirth?: string | undefined;
815
+ companyName?: string | undefined;
816
+ vatId?: string | undefined;
817
+ addresses: WritableArray<_54.Address>;
818
+ defaultShippingAddressId?: string | undefined;
819
+ shippingAddressIds?: WritableArray<string> | undefined;
820
+ defaultBillingAddressId?: string | undefined;
821
+ billingAddressIds?: WritableArray<string> | undefined;
822
+ isEmailVerified: boolean;
823
+ customerGroup?: {
824
+ typeId: "customer-group";
825
+ id: string;
826
+ obj?: {
827
+ id: string;
828
+ version: number;
829
+ createdAt: string;
830
+ lastModifiedAt: string;
831
+ lastModifiedBy?: {
832
+ clientId?: string | undefined;
833
+ externalUserId?: string | undefined;
834
+ customer?: {
835
+ typeId: "customer";
836
+ id: string;
837
+ obj?: /*elided*/any | undefined;
838
+ } | undefined;
839
+ anonymousId?: string | undefined;
840
+ attributedTo?: {
841
+ clientId?: string | undefined;
842
+ source: _58.AttributionSource;
843
+ } | undefined;
844
+ associate?: {
845
+ typeId: "customer";
846
+ id: string;
847
+ obj?: /*elided*/any | undefined;
848
+ } | undefined;
469
849
  } | undefined;
470
- email: string;
471
- password?: string | undefined;
472
- firstName?: string | undefined;
473
- lastName?: string | undefined;
474
- middleName?: string | undefined;
475
- title?: string | undefined;
476
- dateOfBirth?: string | undefined;
477
- companyName?: string | undefined;
478
- vatId?: string | undefined;
479
- addresses: WritableArray<ctp.Address>;
480
- defaultShippingAddressId?: string | undefined;
481
- shippingAddressIds?: WritableArray<string> | undefined;
482
- defaultBillingAddressId?: string | undefined;
483
- billingAddressIds?: WritableArray<string> | undefined;
484
- isEmailVerified: boolean;
485
- customerGroup?: {
486
- typeId: "customer-group";
850
+ createdBy?: {
851
+ clientId?: string | undefined;
852
+ externalUserId?: string | undefined;
853
+ customer?: {
854
+ typeId: "customer";
855
+ id: string;
856
+ obj?: /*elided*/any | undefined;
857
+ } | undefined;
858
+ anonymousId?: string | undefined;
859
+ attributedTo?: {
860
+ clientId?: string | undefined;
861
+ source: _59.AttributionSource;
862
+ } | undefined;
863
+ associate?: {
864
+ typeId: "customer";
865
+ id: string;
866
+ obj?: /*elided*/any | undefined;
867
+ } | undefined;
868
+ } | undefined;
869
+ key?: string | undefined;
870
+ name: string;
871
+ custom?: {
872
+ type: {
873
+ typeId: "type";
487
874
  id: string;
488
875
  obj?: {
489
- id: string;
490
- version: number;
491
- createdAt: string;
492
- lastModifiedAt: string;
493
- lastModifiedBy?: {
494
- clientId?: string | undefined;
495
- externalUserId?: string | undefined;
496
- customer?: {
497
- typeId: "customer";
498
- id: string;
499
- obj?: /*elided*/ any | undefined;
500
- } | undefined;
501
- anonymousId?: string | undefined;
502
- attributedTo?: {
503
- clientId?: string | undefined;
504
- source: ctp.AttributionSource;
505
- } | undefined;
506
- associate?: {
507
- typeId: "customer";
508
- id: string;
509
- obj?: /*elided*/ any | undefined;
510
- } | undefined;
876
+ id: string;
877
+ version: number;
878
+ createdAt: string;
879
+ lastModifiedAt: string;
880
+ lastModifiedBy?: {
881
+ clientId?: string | undefined;
882
+ externalUserId?: string | undefined;
883
+ customer?: {
884
+ typeId: "customer";
885
+ id: string;
886
+ obj?: /*elided*/any | undefined;
511
887
  } | undefined;
512
- createdBy?: {
513
- clientId?: string | undefined;
514
- externalUserId?: string | undefined;
515
- customer?: {
516
- typeId: "customer";
517
- id: string;
518
- obj?: /*elided*/ any | undefined;
519
- } | undefined;
520
- anonymousId?: string | undefined;
521
- attributedTo?: {
522
- clientId?: string | undefined;
523
- source: ctp.AttributionSource;
524
- } | undefined;
525
- associate?: {
526
- typeId: "customer";
527
- id: string;
528
- obj?: /*elided*/ any | undefined;
529
- } | undefined;
888
+ anonymousId?: string | undefined;
889
+ attributedTo?: {
890
+ clientId?: string | undefined;
891
+ source: _60.AttributionSource;
530
892
  } | undefined;
531
- key?: string | undefined;
532
- name: string;
533
- custom?: {
534
- type: {
535
- typeId: "type";
536
- id: string;
537
- obj?: {
538
- id: string;
539
- version: number;
540
- createdAt: string;
541
- lastModifiedAt: string;
542
- lastModifiedBy?: {
543
- clientId?: string | undefined;
544
- externalUserId?: string | undefined;
545
- customer?: {
546
- typeId: "customer";
547
- id: string;
548
- obj?: /*elided*/ any | undefined;
549
- } | undefined;
550
- anonymousId?: string | undefined;
551
- attributedTo?: {
552
- clientId?: string | undefined;
553
- source: ctp.AttributionSource;
554
- } | undefined;
555
- associate?: {
556
- typeId: "customer";
557
- id: string;
558
- obj?: /*elided*/ any | undefined;
559
- } | undefined;
560
- } | undefined;
561
- createdBy?: {
562
- clientId?: string | undefined;
563
- externalUserId?: string | undefined;
564
- customer?: {
565
- typeId: "customer";
566
- id: string;
567
- obj?: /*elided*/ any | undefined;
568
- } | undefined;
569
- anonymousId?: string | undefined;
570
- attributedTo?: {
571
- clientId?: string | undefined;
572
- source: ctp.AttributionSource;
573
- } | undefined;
574
- associate?: {
575
- typeId: "customer";
576
- id: string;
577
- obj?: /*elided*/ any | undefined;
578
- } | undefined;
579
- } | undefined;
580
- key: string;
581
- name: {
582
- [x: string]: string;
583
- };
584
- description?: {
585
- [x: string]: string;
586
- } | undefined;
587
- resourceTypeIds: WritableArray<ctp.ResourceTypeId>;
588
- fieldDefinitions: WritableArray<ctp.FieldDefinition>;
589
- } | undefined;
590
- };
591
- fields: {
592
- [x: string]: any;
593
- };
893
+ associate?: {
894
+ typeId: "customer";
895
+ id: string;
896
+ obj?: /*elided*/any | undefined;
594
897
  } | undefined;
595
- } | undefined;
596
- } | undefined;
597
- custom?: {
598
- type: {
599
- typeId: "type";
600
- id: string;
601
- obj?: {
602
- id: string;
603
- version: number;
604
- createdAt: string;
605
- lastModifiedAt: string;
606
- lastModifiedBy?: {
607
- clientId?: string | undefined;
608
- externalUserId?: string | undefined;
609
- customer?: {
610
- typeId: "customer";
611
- id: string;
612
- obj?: /*elided*/ any | undefined;
613
- } | undefined;
614
- anonymousId?: string | undefined;
615
- attributedTo?: {
616
- clientId?: string | undefined;
617
- source: ctp.AttributionSource;
618
- } | undefined;
619
- associate?: {
620
- typeId: "customer";
621
- id: string;
622
- obj?: /*elided*/ any | undefined;
623
- } | undefined;
624
- } | undefined;
625
- createdBy?: {
626
- clientId?: string | undefined;
627
- externalUserId?: string | undefined;
628
- customer?: {
629
- typeId: "customer";
630
- id: string;
631
- obj?: /*elided*/ any | undefined;
632
- } | undefined;
633
- anonymousId?: string | undefined;
634
- attributedTo?: {
635
- clientId?: string | undefined;
636
- source: ctp.AttributionSource;
637
- } | undefined;
638
- associate?: {
639
- typeId: "customer";
640
- id: string;
641
- obj?: /*elided*/ any | undefined;
642
- } | undefined;
643
- } | undefined;
644
- key: string;
645
- name: {
646
- [x: string]: string;
647
- };
648
- description?: {
649
- [x: string]: string;
650
- } | undefined;
651
- resourceTypeIds: WritableArray<ctp.ResourceTypeId>;
652
- fieldDefinitions: WritableArray<ctp.FieldDefinition>;
898
+ } | undefined;
899
+ createdBy?: {
900
+ clientId?: string | undefined;
901
+ externalUserId?: string | undefined;
902
+ customer?: {
903
+ typeId: "customer";
904
+ id: string;
905
+ obj?: /*elided*/any | undefined;
906
+ } | undefined;
907
+ anonymousId?: string | undefined;
908
+ attributedTo?: {
909
+ clientId?: string | undefined;
910
+ source: _61.AttributionSource;
911
+ } | undefined;
912
+ associate?: {
913
+ typeId: "customer";
914
+ id: string;
915
+ obj?: /*elided*/any | undefined;
653
916
  } | undefined;
654
- };
655
- fields: {
656
- [x: string]: any;
657
- };
917
+ } | undefined;
918
+ key: string;
919
+ name: {
920
+ [x: string]: string;
921
+ };
922
+ description?: {
923
+ [x: string]: string;
924
+ } | undefined;
925
+ resourceTypeIds: WritableArray<_62.ResourceTypeId>;
926
+ fieldDefinitions: WritableArray<_64.FieldDefinition>;
927
+ } | undefined;
928
+ };
929
+ fields: {
930
+ [x: string]: any;
931
+ };
658
932
  } | undefined;
659
- locale?: string | undefined;
660
- salutation?: string | undefined;
661
- stores: WritableArray<ctp.StoreKeyReference>;
662
- authenticationMode: ctp.AuthenticationMode;
663
- customerGroupAssignments?: WritableArray<ctp.CustomerGroupAssignment> | undefined;
664
- };
665
- confirmEmail(context: RepositoryContext, resetPassword: MyCustomerEmailVerify): {
933
+ } | undefined;
934
+ } | undefined;
935
+ custom?: {
936
+ type: {
937
+ typeId: "type";
666
938
  id: string;
667
- version: number;
668
- key?: string | undefined;
669
- customerNumber?: string | undefined;
670
- externalId?: string | undefined;
671
- createdAt: string;
672
- lastModifiedAt: string;
673
- lastModifiedBy?: {
939
+ obj?: {
940
+ id: string;
941
+ version: number;
942
+ createdAt: string;
943
+ lastModifiedAt: string;
944
+ lastModifiedBy?: {
674
945
  clientId?: string | undefined;
675
946
  externalUserId?: string | undefined;
676
947
  customer?: {
677
- typeId: "customer";
678
- id: string;
679
- obj?: /*elided*/ any | undefined;
948
+ typeId: "customer";
949
+ id: string;
950
+ obj?: /*elided*/any | undefined;
680
951
  } | undefined;
681
952
  anonymousId?: string | undefined;
682
953
  attributedTo?: {
683
- clientId?: string | undefined;
684
- source: ctp.AttributionSource;
954
+ clientId?: string | undefined;
955
+ source: _66.AttributionSource;
685
956
  } | undefined;
686
957
  associate?: {
687
- typeId: "customer";
688
- id: string;
689
- obj?: /*elided*/ any | undefined;
958
+ typeId: "customer";
959
+ id: string;
960
+ obj?: /*elided*/any | undefined;
690
961
  } | undefined;
691
- } | undefined;
692
- createdBy?: {
962
+ } | undefined;
963
+ createdBy?: {
693
964
  clientId?: string | undefined;
694
965
  externalUserId?: string | undefined;
695
966
  customer?: {
696
- typeId: "customer";
697
- id: string;
698
- obj?: /*elided*/ any | undefined;
967
+ typeId: "customer";
968
+ id: string;
969
+ obj?: /*elided*/any | undefined;
699
970
  } | undefined;
700
971
  anonymousId?: string | undefined;
701
972
  attributedTo?: {
702
- clientId?: string | undefined;
703
- source: ctp.AttributionSource;
973
+ clientId?: string | undefined;
974
+ source: _67.AttributionSource;
704
975
  } | undefined;
705
976
  associate?: {
706
- typeId: "customer";
707
- id: string;
708
- obj?: /*elided*/ any | undefined;
977
+ typeId: "customer";
978
+ id: string;
979
+ obj?: /*elided*/any | undefined;
709
980
  } | undefined;
981
+ } | undefined;
982
+ key: string;
983
+ name: {
984
+ [x: string]: string;
985
+ };
986
+ description?: {
987
+ [x: string]: string;
988
+ } | undefined;
989
+ resourceTypeIds: WritableArray<_68.ResourceTypeId>;
990
+ fieldDefinitions: WritableArray<_70.FieldDefinition>;
710
991
  } | undefined;
711
- email: string;
712
- password?: string | undefined;
713
- firstName?: string | undefined;
714
- lastName?: string | undefined;
715
- middleName?: string | undefined;
716
- title?: string | undefined;
717
- dateOfBirth?: string | undefined;
718
- companyName?: string | undefined;
719
- vatId?: string | undefined;
720
- addresses: WritableArray<ctp.Address>;
721
- defaultShippingAddressId?: string | undefined;
722
- shippingAddressIds?: WritableArray<string> | undefined;
723
- defaultBillingAddressId?: string | undefined;
724
- billingAddressIds?: WritableArray<string> | undefined;
725
- isEmailVerified: boolean;
726
- customerGroup?: {
727
- typeId: "customer-group";
728
- id: string;
729
- obj?: {
730
- id: string;
731
- version: number;
732
- createdAt: string;
733
- lastModifiedAt: string;
734
- lastModifiedBy?: {
735
- clientId?: string | undefined;
736
- externalUserId?: string | undefined;
737
- customer?: {
738
- typeId: "customer";
739
- id: string;
740
- obj?: /*elided*/ any | undefined;
741
- } | undefined;
742
- anonymousId?: string | undefined;
743
- attributedTo?: {
744
- clientId?: string | undefined;
745
- source: ctp.AttributionSource;
746
- } | undefined;
747
- associate?: {
748
- typeId: "customer";
749
- id: string;
750
- obj?: /*elided*/ any | undefined;
751
- } | undefined;
752
- } | undefined;
753
- createdBy?: {
754
- clientId?: string | undefined;
755
- externalUserId?: string | undefined;
756
- customer?: {
757
- typeId: "customer";
758
- id: string;
759
- obj?: /*elided*/ any | undefined;
760
- } | undefined;
761
- anonymousId?: string | undefined;
762
- attributedTo?: {
763
- clientId?: string | undefined;
764
- source: ctp.AttributionSource;
765
- } | undefined;
766
- associate?: {
767
- typeId: "customer";
768
- id: string;
769
- obj?: /*elided*/ any | undefined;
770
- } | undefined;
771
- } | undefined;
772
- key?: string | undefined;
773
- name: string;
774
- custom?: {
775
- type: {
776
- typeId: "type";
777
- id: string;
778
- obj?: {
779
- id: string;
780
- version: number;
781
- createdAt: string;
782
- lastModifiedAt: string;
783
- lastModifiedBy?: {
784
- clientId?: string | undefined;
785
- externalUserId?: string | undefined;
786
- customer?: {
787
- typeId: "customer";
788
- id: string;
789
- obj?: /*elided*/ any | undefined;
790
- } | undefined;
791
- anonymousId?: string | undefined;
792
- attributedTo?: {
793
- clientId?: string | undefined;
794
- source: ctp.AttributionSource;
795
- } | undefined;
796
- associate?: {
797
- typeId: "customer";
798
- id: string;
799
- obj?: /*elided*/ any | undefined;
800
- } | undefined;
801
- } | undefined;
802
- createdBy?: {
803
- clientId?: string | undefined;
804
- externalUserId?: string | undefined;
805
- customer?: {
806
- typeId: "customer";
807
- id: string;
808
- obj?: /*elided*/ any | undefined;
809
- } | undefined;
810
- anonymousId?: string | undefined;
811
- attributedTo?: {
812
- clientId?: string | undefined;
813
- source: ctp.AttributionSource;
814
- } | undefined;
815
- associate?: {
816
- typeId: "customer";
817
- id: string;
818
- obj?: /*elided*/ any | undefined;
819
- } | undefined;
820
- } | undefined;
821
- key: string;
822
- name: {
823
- [x: string]: string;
824
- };
825
- description?: {
826
- [x: string]: string;
827
- } | undefined;
828
- resourceTypeIds: WritableArray<ctp.ResourceTypeId>;
829
- fieldDefinitions: WritableArray<ctp.FieldDefinition>;
830
- } | undefined;
831
- };
832
- fields: {
833
- [x: string]: any;
834
- };
835
- } | undefined;
836
- } | undefined;
837
- } | undefined;
838
- custom?: {
839
- type: {
840
- typeId: "type";
841
- id: string;
842
- obj?: {
843
- id: string;
844
- version: number;
845
- createdAt: string;
846
- lastModifiedAt: string;
847
- lastModifiedBy?: {
848
- clientId?: string | undefined;
849
- externalUserId?: string | undefined;
850
- customer?: {
851
- typeId: "customer";
852
- id: string;
853
- obj?: /*elided*/ any | undefined;
854
- } | undefined;
855
- anonymousId?: string | undefined;
856
- attributedTo?: {
857
- clientId?: string | undefined;
858
- source: ctp.AttributionSource;
859
- } | undefined;
860
- associate?: {
861
- typeId: "customer";
862
- id: string;
863
- obj?: /*elided*/ any | undefined;
864
- } | undefined;
865
- } | undefined;
866
- createdBy?: {
867
- clientId?: string | undefined;
868
- externalUserId?: string | undefined;
869
- customer?: {
870
- typeId: "customer";
871
- id: string;
872
- obj?: /*elided*/ any | undefined;
873
- } | undefined;
874
- anonymousId?: string | undefined;
875
- attributedTo?: {
876
- clientId?: string | undefined;
877
- source: ctp.AttributionSource;
878
- } | undefined;
879
- associate?: {
880
- typeId: "customer";
881
- id: string;
882
- obj?: /*elided*/ any | undefined;
883
- } | undefined;
884
- } | undefined;
885
- key: string;
886
- name: {
887
- [x: string]: string;
888
- };
889
- description?: {
890
- [x: string]: string;
891
- } | undefined;
892
- resourceTypeIds: WritableArray<ctp.ResourceTypeId>;
893
- fieldDefinitions: WritableArray<ctp.FieldDefinition>;
894
- } | undefined;
895
- };
896
- fields: {
897
- [x: string]: any;
898
- };
899
- } | undefined;
900
- locale?: string | undefined;
901
- salutation?: string | undefined;
902
- stores: WritableArray<ctp.StoreKeyReference>;
903
- authenticationMode: ctp.AuthenticationMode;
904
- customerGroupAssignments?: WritableArray<ctp.CustomerGroupAssignment> | undefined;
905
- };
906
- deleteMe(context: RepositoryContext): Customer | undefined;
907
- getMe(context: RepositoryContext): Customer | undefined;
908
- }
909
-
992
+ };
993
+ fields: {
994
+ [x: string]: any;
995
+ };
996
+ } | undefined;
997
+ locale?: string | undefined;
998
+ salutation?: string | undefined;
999
+ stores: WritableArray<_72.StoreKeyReference>;
1000
+ authenticationMode: _74.AuthenticationMode;
1001
+ customerGroupAssignments?: WritableArray<_75.CustomerGroupAssignment> | undefined;
1002
+ };
1003
+ deleteMe(context: RepositoryContext): Customer | undefined;
1004
+ getMe(context: RepositoryContext): Customer | undefined;
1005
+ } //#endregion
1006
+ //#region src/repositories/my-order.d.ts
910
1007
  declare class MyOrderRepository extends OrderRepository {
911
- create(context: RepositoryContext, draft: MyOrderFromCartDraft): Order;
1008
+ create(context: RepositoryContext, draft: MyOrderFromCartDraft): Order;
912
1009
  }
913
1010
 
1011
+ //#endregion
1012
+ //#region src/repositories/order-edit.d.ts
914
1013
  declare class OrderEditRepository extends AbstractResourceRepository<"order-edit"> {
915
- constructor(config: Config);
916
- create(context: RepositoryContext, draft: OrderEditDraft): OrderEdit;
1014
+ constructor(config: Config);
1015
+ create(context: RepositoryContext, draft: OrderEditDraft): OrderEdit;
917
1016
  }
918
1017
 
1018
+ //#endregion
1019
+ //#region src/repositories/payment/index.d.ts
919
1020
  declare class PaymentRepository extends AbstractResourceRepository<"payment"> {
920
- constructor(config: Config);
921
- create(context: RepositoryContext, draft: PaymentDraft): Payment;
1021
+ constructor(config: Config);
1022
+ create(context: RepositoryContext, draft: PaymentDraft): Payment;
922
1023
  }
923
1024
 
1025
+ //#endregion
1026
+ //#region src/product-search.d.ts
924
1027
  interface ProductSearchVariantAvailability {
925
- isOnStock: boolean;
926
- availableQuantity: number;
927
- isOnStockForChannel: string | undefined;
1028
+ isOnStock: boolean;
1029
+ availableQuantity: number;
1030
+ isOnStockForChannel: string | undefined;
928
1031
  }
929
1032
  declare class ProductSearch {
930
- protected _storage: AbstractStorage;
931
- constructor(config: Config);
932
- search(projectKey: string, params: ProductSearchRequest): ProductPagedSearchResponse;
933
- transformProduct(product: Product, staged: boolean, availabilityBySku: Map<string, ProductSearchVariantAvailability>): ProductProjection;
1033
+ protected _storage: AbstractStorage;
1034
+ constructor(config: Config);
1035
+ search(projectKey: string, params: ProductSearchRequest): ProductPagedSearchResponse;
1036
+ transformProduct(product: Product, staged: boolean, availabilityBySku: Map<string, ProductSearchVariantAvailability>): ProductProjection;
934
1037
  }
935
1038
 
1039
+ //#endregion
1040
+ //#region src/repositories/product/index.d.ts
936
1041
  declare class ProductRepository extends AbstractResourceRepository<"product"> {
937
- protected _searchService: ProductSearch;
938
- constructor(config: Config);
939
- create(context: RepositoryContext, draft: ProductDraft): Product;
940
- search(context: RepositoryContext, searchRequest: ProductSearchRequest): ProductPagedSearchResponse;
1042
+ protected _searchService: ProductSearch;
1043
+ constructor(config: Config);
1044
+ create(context: RepositoryContext, draft: ProductDraft): Product;
1045
+ search(context: RepositoryContext, searchRequest: ProductSearchRequest): ProductPagedSearchResponse;
941
1046
  }
942
1047
 
1048
+ //#endregion
1049
+ //#region src/repositories/product-discount.d.ts
943
1050
  declare class ProductDiscountRepository extends AbstractResourceRepository<"product-discount"> {
944
- constructor(config: Config);
945
- create(context: RepositoryContext, draft: ProductDiscountDraft): ProductDiscount;
1051
+ constructor(config: Config);
1052
+ create(context: RepositoryContext, draft: ProductDiscountDraft): ProductDiscount;
946
1053
  }
947
1054
 
948
- /**
949
- * This module implements the commercetools product projection filter expression.
950
- */
951
-
1055
+ //#endregion
1056
+ //#region src/lib/projectionSearchFilter.d.ts
952
1057
  type RangeExpression = {
953
- type: "RangeExpression";
954
- start?: number;
955
- stop?: number;
956
- match: (obj: any) => boolean;
1058
+ type: "RangeExpression";
1059
+ start?: number;
1060
+ stop?: number;
1061
+ match: (obj: any) => boolean;
957
1062
  };
958
1063
  type FilterExpression = {
959
- type: "FilterExpression";
960
- match: (obj: any) => boolean;
1064
+ type: "FilterExpression";
1065
+ match: (obj: any) => boolean;
961
1066
  };
962
1067
 
1068
+ //#endregion
1069
+ //#region src/product-projection-search.d.ts
963
1070
  type ProductProjectionSearchParams = {
964
- fuzzy?: boolean;
965
- fuzzyLevel?: number;
966
- markMatchingVariants?: boolean;
967
- staged?: boolean;
968
- filter?: string[];
969
- "filter.facets"?: string[];
970
- "filter.query"?: string[];
971
- facet?: string | string[];
972
- sort?: string | string[];
973
- limit?: number;
974
- offset?: number;
975
- withTotal?: boolean;
976
- priceCurrency?: string;
977
- priceCountry?: string;
978
- priceCustomerGroup?: string;
979
- priceChannel?: string;
980
- localeProjection?: string;
981
- storeProjection?: string;
982
- expand?: string | string[];
983
- [key: string]: QueryParam;
1071
+ fuzzy?: boolean;
1072
+ fuzzyLevel?: number;
1073
+ markMatchingVariants?: boolean;
1074
+ staged?: boolean;
1075
+ filter?: string[];
1076
+ "filter.facets"?: string[];
1077
+ "filter.query"?: string[];
1078
+ facet?: string | string[];
1079
+ sort?: string | string[];
1080
+ limit?: number;
1081
+ offset?: number;
1082
+ withTotal?: boolean;
1083
+ priceCurrency?: string;
1084
+ priceCountry?: string;
1085
+ priceCustomerGroup?: string;
1086
+ priceChannel?: string;
1087
+ localeProjection?: string;
1088
+ storeProjection?: string;
1089
+ expand?: string | string[];
1090
+ [key: string]: QueryParam;
984
1091
  };
985
1092
  declare class ProductProjectionSearch {
986
- protected _storage: AbstractStorage;
987
- constructor(config: Config);
988
- search(projectKey: string, params: ProductProjectionSearchParams): ProductProjectionPagedSearchResponse;
989
- transform(product: Product, staged: boolean): ProductProjection;
990
- getFacets(params: ProductProjectionSearchParams, products: ProductProjection[]): FacetResults;
991
- /**
992
- * TODO: This implemention needs the following additional features:
993
- * - counting products
994
- * - correct dataType
995
- */
996
- termFacet(facet: string, products: ProductProjection[], countProducts: boolean): TermFacetResult;
997
- filterFacet(source: string, filters: FilterExpression[] | undefined, products: ProductProjection[], countProducts: boolean): FilteredFacetResult;
998
- rangeFacet(source: string, ranges: RangeExpression[] | undefined, products: ProductProjection[], countProducts: boolean): RangeFacetResult;
1093
+ protected _storage: AbstractStorage;
1094
+ constructor(config: Config);
1095
+ search(projectKey: string, params: ProductProjectionSearchParams): ProductProjectionPagedSearchResponse;
1096
+ transform(product: Product, staged: boolean): ProductProjection;
1097
+ getFacets(params: ProductProjectionSearchParams, products: ProductProjection[]): FacetResults;
1098
+ /**
1099
+ * TODO: This implemention needs the following additional features:
1100
+ * - counting products
1101
+ * - correct dataType
1102
+ */
1103
+ termFacet(facet: string, products: ProductProjection[], countProducts: boolean): TermFacetResult;
1104
+ filterFacet(source: string, filters: FilterExpression[] | undefined, products: ProductProjection[], countProducts: boolean): FilteredFacetResult;
1105
+ rangeFacet(source: string, ranges: RangeExpression[] | undefined, products: ProductProjection[], countProducts: boolean): RangeFacetResult;
999
1106
  }
1000
1107
 
1108
+ //#endregion
1109
+ //#region src/repositories/product-projection.d.ts
1001
1110
  type ProductProjectionQueryParams = {
1002
- staged?: boolean;
1003
- priceCurrency?: string;
1004
- priceCountry?: string;
1005
- priceCustomerGroup?: string;
1006
- priceChannel?: string;
1007
- localeProjection?: string;
1008
- storeProjection?: string;
1009
- expand?: string | string[];
1010
- sort?: string | string[];
1011
- limit?: number;
1012
- offset?: number;
1013
- withTotal?: boolean;
1014
- where?: string | string[];
1015
- [key: string]: QueryParam;
1111
+ staged?: boolean;
1112
+ priceCurrency?: string;
1113
+ priceCountry?: string;
1114
+ priceCustomerGroup?: string;
1115
+ priceChannel?: string;
1116
+ localeProjection?: string;
1117
+ storeProjection?: string;
1118
+ expand?: string | string[];
1119
+ sort?: string | string[];
1120
+ limit?: number;
1121
+ offset?: number;
1122
+ withTotal?: boolean;
1123
+ where?: string | string[];
1124
+ [key: string]: QueryParam;
1016
1125
  };
1017
1126
  declare class ProductProjectionRepository extends AbstractResourceRepository<"product-projection"> {
1018
- protected _searchService: ProductProjectionSearch;
1019
- constructor(config: Config);
1020
- create(context: RepositoryContext, draft: ProductDraft): ProductProjection;
1021
- get(context: RepositoryContext, id: string, params?: GetParams$1): ProductProjection | null;
1022
- query(context: RepositoryContext, params?: ProductProjectionQueryParams): {
1023
- count: number;
1024
- total: number;
1025
- offset: number;
1026
- limit: number;
1027
- results: ProductProjection[];
1028
- };
1029
- search(context: RepositoryContext, query: ProductProjectionQueryParams): ctp.ProductProjectionPagedSearchResponse;
1127
+ protected _searchService: ProductProjectionSearch;
1128
+ constructor(config: Config);
1129
+ create(context: RepositoryContext, draft: ProductDraft): ProductProjection;
1130
+ get(context: RepositoryContext, id: string, params?: GetParams$1): ProductProjection | null;
1131
+ query(context: RepositoryContext, params?: ProductProjectionQueryParams): {
1132
+ count: number;
1133
+ total: number;
1134
+ offset: number;
1135
+ limit: number;
1136
+ results: ProductProjection[];
1137
+ };
1138
+ search(context: RepositoryContext, query: ProductProjectionQueryParams): _77.ProductProjectionPagedSearchResponse;
1030
1139
  }
1031
1140
 
1141
+ //#endregion
1142
+ //#region src/repositories/product-selection.d.ts
1032
1143
  declare class ProductSelectionRepository extends AbstractResourceRepository<"product-selection"> {
1033
- constructor(config: Config);
1034
- create(context: RepositoryContext, draft: ProductSelectionDraft): ProductSelection;
1144
+ constructor(config: Config);
1145
+ create(context: RepositoryContext, draft: ProductSelectionDraft): ProductSelection;
1035
1146
  }
1036
1147
 
1148
+ //#endregion
1149
+ //#region src/repositories/product-type.d.ts
1037
1150
  declare class ProductTypeRepository extends AbstractResourceRepository<"product-type"> {
1038
- constructor(config: Config);
1039
- create(context: RepositoryContext, draft: ProductTypeDraft): ProductType;
1151
+ constructor(config: Config);
1152
+ create(context: RepositoryContext, draft: ProductTypeDraft): ProductType;
1040
1153
  }
1041
1154
 
1155
+ //#endregion
1156
+ //#region src/repositories/project.d.ts
1042
1157
  declare class ProjectRepository extends AbstractRepository<Project> {
1043
- constructor(config: Config);
1044
- get(context: RepositoryContext): Project | null;
1045
- postProcessResource(context: RepositoryContext, resource: Project): Project;
1046
- saveNew(context: RepositoryContext, resource: Writable<Project>): void;
1047
- saveUpdate(context: RepositoryContext, version: number, resource: Project): void;
1158
+ constructor(config: Config);
1159
+ get(context: RepositoryContext): Project | null;
1160
+ postProcessResource(context: RepositoryContext, resource: Project): Project;
1161
+ saveNew(context: RepositoryContext, resource: Writable<Project>): void;
1162
+ saveUpdate(context: RepositoryContext, version: number, resource: Project): void;
1048
1163
  }
1049
1164
 
1165
+ //#endregion
1166
+ //#region src/repositories/quote/index.d.ts
1050
1167
  declare class QuoteRepository extends AbstractResourceRepository<"quote"> {
1051
- constructor(config: Config);
1052
- create(context: RepositoryContext, draft: QuoteDraft): Quote;
1168
+ constructor(config: Config);
1169
+ create(context: RepositoryContext, draft: QuoteDraft): Quote;
1053
1170
  }
1054
1171
 
1172
+ //#endregion
1173
+ //#region src/repositories/quote-staged/index.d.ts
1055
1174
  declare class StagedQuoteRepository extends AbstractResourceRepository<"staged-quote"> {
1056
- constructor(config: Config);
1057
- create(context: RepositoryContext, draft: StagedQuoteDraft): StagedQuote;
1175
+ constructor(config: Config);
1176
+ create(context: RepositoryContext, draft: StagedQuoteDraft): StagedQuote;
1058
1177
  }
1059
1178
 
1179
+ //#endregion
1180
+ //#region src/repositories/review.d.ts
1060
1181
  declare class ReviewRepository extends AbstractResourceRepository<"review"> {
1061
- constructor(config: Config);
1062
- create(context: RepositoryContext, draft: ReviewDraft): Review;
1182
+ constructor(config: Config);
1183
+ create(context: RepositoryContext, draft: ReviewDraft): Review;
1063
1184
  }
1064
1185
 
1186
+ //#endregion
1187
+ //#region src/repositories/shipping-method/index.d.ts
1065
1188
  declare class ShippingMethodRepository extends AbstractResourceRepository<"shipping-method"> {
1066
- constructor(config: Config);
1067
- create(context: RepositoryContext, draft: ShippingMethodDraft): ShippingMethod;
1068
- matchingCart(context: RepositoryContext, cartId: string, params?: GetParams$1): {
1069
- results: {
1070
- zoneRates: {
1071
- zone: ZoneReference;
1072
- shippingRates: ctp.ShippingRate[];
1073
- }[];
1074
- id: string;
1075
- version: number;
1076
- createdAt: string;
1077
- lastModifiedAt: string;
1078
- lastModifiedBy?: ctp.LastModifiedBy;
1079
- createdBy?: ctp.CreatedBy;
1080
- key?: string;
1081
- name: string;
1082
- localizedName?: ctp.LocalizedString;
1083
- description?: string;
1084
- localizedDescription?: ctp.LocalizedString;
1085
- taxCategory: ctp.TaxCategoryReference;
1086
- active: boolean;
1087
- isDefault: boolean;
1088
- predicate?: string;
1089
- custom?: ctp.CustomFields;
1090
- }[];
1091
- limit?: number;
1092
- count: number;
1093
- total?: number;
1094
- offset?: number;
1095
- } | undefined;
1096
- private _transformZoneRateDraft;
1189
+ constructor(config: Config);
1190
+ create(context: RepositoryContext, draft: ShippingMethodDraft): ShippingMethod;
1191
+ matchingCart(context: RepositoryContext, cartId: string, params?: GetParams$1): {
1192
+ results: {
1193
+ zoneRates: {
1194
+ zone: ZoneReference;
1195
+ shippingRates: _78.ShippingRate[];
1196
+ }[];
1197
+ id: string;
1198
+ version: number;
1199
+ createdAt: string;
1200
+ lastModifiedAt: string;
1201
+ lastModifiedBy?: _79.LastModifiedBy;
1202
+ createdBy?: _80.CreatedBy;
1203
+ key?: string;
1204
+ name: string;
1205
+ localizedName?: _81.LocalizedString;
1206
+ description?: string;
1207
+ localizedDescription?: _82.LocalizedString;
1208
+ taxCategory: _83.TaxCategoryReference;
1209
+ active: boolean;
1210
+ isDefault: boolean;
1211
+ predicate?: string;
1212
+ custom?: _84.CustomFields;
1213
+ }[];
1214
+ limit?: number;
1215
+ count: number;
1216
+ total?: number;
1217
+ offset?: number;
1218
+ } | undefined;
1219
+ private _transformZoneRateDraft;
1097
1220
  }
1098
1221
 
1222
+ //#endregion
1223
+ //#region src/repositories/shopping-list/index.d.ts
1099
1224
  declare class ShoppingListRepository extends AbstractResourceRepository<"shopping-list"> {
1100
- constructor(config: Config);
1101
- create(context: RepositoryContext, draft: ShoppingListDraft): ShoppingList;
1102
- draftLineItemtoLineItem: (projectKey: string, draftLineItem: LineItemDraft) => ShoppingListLineItem;
1225
+ constructor(config: Config);
1226
+ create(context: RepositoryContext, draft: ShoppingListDraft): ShoppingList;
1227
+ draftLineItemtoLineItem: (projectKey: string, draftLineItem: LineItemDraft) => ShoppingListLineItem;
1103
1228
  }
1104
1229
 
1230
+ //#endregion
1231
+ //#region src/repositories/standalone-price.d.ts
1105
1232
  declare class StandAlonePriceRepository extends AbstractResourceRepository<"standalone-price"> {
1106
- constructor(config: Config);
1107
- create(context: RepositoryContext, draft: StandalonePriceDraft): StandalonePrice;
1108
- transformChannelReferenceDraft(channel: ChannelResourceIdentifier): ChannelReference;
1233
+ constructor(config: Config);
1234
+ create(context: RepositoryContext, draft: StandalonePriceDraft): StandalonePrice;
1235
+ transformChannelReferenceDraft(channel: ChannelResourceIdentifier): ChannelReference;
1109
1236
  }
1110
1237
 
1238
+ //#endregion
1239
+ //#region src/repositories/state.d.ts
1111
1240
  declare class StateRepository extends AbstractResourceRepository<"state"> {
1112
- constructor(config: Config);
1113
- create(context: RepositoryContext, draft: StateDraft): State;
1241
+ constructor(config: Config);
1242
+ create(context: RepositoryContext, draft: StateDraft): State;
1114
1243
  }
1115
1244
 
1245
+ //#endregion
1246
+ //#region src/repositories/store.d.ts
1116
1247
  declare class StoreRepository extends AbstractResourceRepository<"store"> {
1117
- constructor(config: Config);
1118
- create(context: RepositoryContext, draft: StoreDraft): Store;
1248
+ constructor(config: Config);
1249
+ create(context: RepositoryContext, draft: StoreDraft): Store;
1119
1250
  }
1120
1251
 
1252
+ //#endregion
1253
+ //#region src/repositories/subscription.d.ts
1121
1254
  declare class SubscriptionRepository extends AbstractResourceRepository<"subscription"> {
1122
- constructor(config: Config);
1123
- create(context: RepositoryContext, draft: SubscriptionDraft): Subscription;
1255
+ constructor(config: Config);
1256
+ create(context: RepositoryContext, draft: SubscriptionDraft): Subscription;
1124
1257
  }
1125
1258
 
1259
+ //#endregion
1260
+ //#region src/repositories/tax-category/index.d.ts
1126
1261
  declare class TaxCategoryRepository extends AbstractResourceRepository<"tax-category"> {
1127
- constructor(config: Config);
1128
- create(context: RepositoryContext, draft: TaxCategoryDraft): TaxCategory;
1262
+ constructor(config: Config);
1263
+ create(context: RepositoryContext, draft: TaxCategoryDraft): TaxCategory;
1129
1264
  }
1130
1265
 
1266
+ //#endregion
1267
+ //#region src/repositories/type/index.d.ts
1131
1268
  declare class TypeRepository extends AbstractResourceRepository<"type"> {
1132
- constructor(config: Config);
1133
- create(context: RepositoryContext, draft: TypeDraft): Type;
1269
+ constructor(config: Config);
1270
+ create(context: RepositoryContext, draft: TypeDraft): Type;
1134
1271
  }
1135
1272
 
1273
+ //#endregion
1274
+ //#region src/repositories/zone.d.ts
1136
1275
  declare class ZoneRepository extends AbstractResourceRepository<"zone"> {
1137
- constructor(config: Config);
1138
- create(context: RepositoryContext, draft: ZoneDraft): Zone;
1276
+ constructor(config: Config);
1277
+ create(context: RepositoryContext, draft: ZoneDraft): Zone;
1139
1278
  }
1140
1279
 
1280
+ //#endregion
1281
+ //#region src/repositories/index.d.ts
1141
1282
  type RepositoryMap = ReturnType<typeof createRepositories>;
1142
1283
  declare const createRepositories: (config: Config) => {
1143
- "as-associate": {
1144
- cart: AsAssociateCartRepository;
1145
- order: AsAssociateOrderRepository;
1146
- "quote-request": AsAssociateQuoteRequestRepository;
1147
- };
1148
- "associate-role": AssociateRoleRepository;
1149
- "attribute-group": AttributeGroupRepository;
1150
- "business-unit": BusinessUnitRepository;
1151
- category: CategoryRepository;
1152
- cart: CartRepository;
1153
- "cart-discount": CartDiscountRepository;
1154
- customer: CustomerRepository;
1155
- channel: ChannelRepository;
1156
- "customer-group": CustomerGroupRepository;
1157
- "discount-code": DiscountCodeRepository;
1158
- extension: ExtensionRepository;
1159
- "inventory-entry": InventoryEntryRepository;
1160
- "key-value-document": CustomObjectRepository;
1161
- order: OrderRepository;
1162
- "order-edit": OrderEditRepository;
1163
- payment: PaymentRepository;
1164
- "my-cart": CartRepository;
1165
- "my-order": MyOrderRepository;
1166
- "my-customer": MyCustomerRepository;
1167
- "my-payment": PaymentRepository;
1168
- "my-shopping-list": ShoppingListRepository;
1169
- product: ProductRepository;
1170
- "product-type": ProductTypeRepository;
1171
- "product-discount": ProductDiscountRepository;
1172
- "product-projection": ProductProjectionRepository;
1173
- "product-selection": ProductSelectionRepository;
1174
- "product-tailoring": ProductTailoringRepository;
1175
- project: ProjectRepository;
1176
- review: ReviewRepository;
1177
- quote: QuoteRepository;
1178
- "quote-request": QuoteRequestRepository;
1179
- "shipping-method": ShippingMethodRepository;
1180
- "shopping-list": ShoppingListRepository;
1181
- "staged-quote": StagedQuoteRepository;
1182
- "standalone-price": StandAlonePriceRepository;
1183
- state: StateRepository;
1184
- store: StoreRepository;
1185
- subscription: SubscriptionRepository;
1186
- "tax-category": TaxCategoryRepository;
1187
- type: TypeRepository;
1188
- zone: ZoneRepository;
1284
+ "as-associate": {
1285
+ cart: AsAssociateCartRepository;
1286
+ order: AsAssociateOrderRepository;
1287
+ "quote-request": AsAssociateQuoteRequestRepository;
1288
+ };
1289
+ "associate-role": AssociateRoleRepository;
1290
+ "attribute-group": AttributeGroupRepository;
1291
+ "business-unit": BusinessUnitRepository;
1292
+ category: CategoryRepository;
1293
+ cart: CartRepository;
1294
+ "cart-discount": CartDiscountRepository;
1295
+ customer: CustomerRepository;
1296
+ channel: ChannelRepository;
1297
+ "customer-group": CustomerGroupRepository;
1298
+ "discount-code": DiscountCodeRepository;
1299
+ extension: ExtensionRepository;
1300
+ "inventory-entry": InventoryEntryRepository;
1301
+ "key-value-document": CustomObjectRepository;
1302
+ order: OrderRepository;
1303
+ "order-edit": OrderEditRepository;
1304
+ payment: PaymentRepository;
1305
+ "my-cart": CartRepository;
1306
+ "my-order": MyOrderRepository;
1307
+ "my-customer": MyCustomerRepository;
1308
+ "my-payment": PaymentRepository;
1309
+ "my-shopping-list": ShoppingListRepository;
1310
+ product: ProductRepository;
1311
+ "product-type": ProductTypeRepository;
1312
+ "product-discount": ProductDiscountRepository;
1313
+ "product-projection": ProductProjectionRepository;
1314
+ "product-selection": ProductSelectionRepository;
1315
+ "product-tailoring": ProductTailoringRepository;
1316
+ project: ProjectRepository;
1317
+ review: ReviewRepository;
1318
+ quote: QuoteRepository;
1319
+ "quote-request": QuoteRequestRepository;
1320
+ "shipping-method": ShippingMethodRepository;
1321
+ "shopping-list": ShoppingListRepository;
1322
+ "staged-quote": StagedQuoteRepository;
1323
+ "standalone-price": StandAlonePriceRepository;
1324
+ state: StateRepository;
1325
+ store: StoreRepository;
1326
+ subscription: SubscriptionRepository;
1327
+ "tax-category": TaxCategoryRepository;
1328
+ type: TypeRepository;
1329
+ zone: ZoneRepository;
1189
1330
  };
1190
1331
 
1332
+ //#endregion
1333
+ //#region src/types.d.ts
1191
1334
  type Builtin = string | number | boolean | undefined | null | symbol | bigint | Date | RegExp;
1192
- type Writable<T> = T extends Builtin ? T : T extends ReadonlyArray<infer U> ? WritableArray<U> : T extends object ? {
1193
- -readonly [P in keyof T]: Writable<T[P]>;
1194
- } : T;
1195
- interface WritableArray<T> extends Array<Writable<T>> {
1196
- }
1197
- type ShallowWritable<T> = {
1198
- -readonly [P in keyof T]: T[P];
1199
- };
1335
+ type Writable<T> = T extends Builtin ? T : T extends ReadonlyArray<infer U> ? WritableArray<U> : T extends object ? { -readonly [P in keyof T]: Writable<T[P]> } : T;
1336
+ interface WritableArray<T> extends Array<Writable<T>> {}
1337
+ type ShallowWritable<T> = { -readonly [P in keyof T]: T[P] };
1200
1338
  type ResourceType = keyof ResourceMap & keyof RepositoryMap;
1201
1339
  type ResourceMap = {
1202
- "attribute-group": ctp.AttributeGroup;
1203
- "associate-role": ctp.AssociateRole;
1204
- "business-unit": ctp.BusinessUnit;
1205
- "cart-discount": ctp.CartDiscount;
1206
- cart: ctp.Cart;
1207
- category: ctp.Category;
1208
- channel: ctp.Channel;
1209
- "customer-email-token": never;
1210
- "customer-group": ctp.CustomerGroup;
1211
- "customer-password-token": never;
1212
- customer: ctp.Customer;
1213
- "discount-code": ctp.DiscountCode;
1214
- extension: ctp.Extension;
1215
- "inventory-entry": ctp.InventoryEntry;
1216
- "key-value-document": ctp.CustomObject;
1217
- "order-edit": ctp.OrderEdit;
1218
- order: ctp.Order;
1219
- payment: ctp.Payment;
1220
- "product-discount": ctp.ProductDiscount;
1221
- "product-price": ctp.StandalonePrice;
1222
- "product-projection": ctp.ProductProjection;
1223
- "product-selection": ctp.ProductSelection;
1224
- "product-tailoring": ctp.ProductTailoring;
1225
- "product-type": ctp.ProductType;
1226
- product: ctp.Product;
1227
- "quote-request": ctp.QuoteRequest;
1228
- quote: ctp.Quote;
1229
- review: ctp.Review;
1230
- "shipping-method": ctp.ShippingMethod;
1231
- "shopping-list": ctp.ShoppingList;
1232
- "staged-quote": ctp.StagedQuote;
1233
- "standalone-price": ctp.StandalonePrice;
1234
- state: ctp.State;
1235
- store: ctp.Store;
1236
- subscription: ctp.Subscription;
1237
- "tax-category": ctp.TaxCategory;
1238
- type: ctp.Type;
1239
- zone: ctp.Zone;
1340
+ "attribute-group": ctp.AttributeGroup;
1341
+ "associate-role": ctp.AssociateRole;
1342
+ "business-unit": ctp.BusinessUnit;
1343
+ "cart-discount": ctp.CartDiscount;
1344
+ cart: ctp.Cart;
1345
+ category: ctp.Category;
1346
+ channel: ctp.Channel;
1347
+ "customer-email-token": never;
1348
+ "customer-group": ctp.CustomerGroup;
1349
+ "customer-password-token": never;
1350
+ customer: ctp.Customer;
1351
+ "discount-code": ctp.DiscountCode;
1352
+ extension: ctp.Extension;
1353
+ "inventory-entry": ctp.InventoryEntry;
1354
+ "key-value-document": ctp.CustomObject;
1355
+ "order-edit": ctp.OrderEdit;
1356
+ order: ctp.Order;
1357
+ payment: ctp.Payment;
1358
+ "product-discount": ctp.ProductDiscount;
1359
+ "product-price": ctp.StandalonePrice;
1360
+ "product-projection": ctp.ProductProjection;
1361
+ "product-selection": ctp.ProductSelection;
1362
+ "product-tailoring": ctp.ProductTailoring;
1363
+ "product-type": ctp.ProductType;
1364
+ product: ctp.Product;
1365
+ "quote-request": ctp.QuoteRequest;
1366
+ quote: ctp.Quote;
1367
+ review: ctp.Review;
1368
+ "shipping-method": ctp.ShippingMethod;
1369
+ "shopping-list": ctp.ShoppingList;
1370
+ "staged-quote": ctp.StagedQuote;
1371
+ "standalone-price": ctp.StandalonePrice;
1372
+ state: ctp.State;
1373
+ store: ctp.Store;
1374
+ subscription: ctp.Subscription;
1375
+ "tax-category": ctp.TaxCategory;
1376
+ type: ctp.Type;
1377
+ zone: ctp.Zone;
1240
1378
  };
1241
1379
  type PagedQueryResponseMap = {
1242
- "attribute-group": ctp.AttributeGroupPagedQueryResponse;
1243
- "associate-role": ctp.AssociateRolePagedQueryResponse;
1244
- "business-unit": ctp.BusinessUnitPagedQueryResponse;
1245
- "cart-discount": ctp.CartDiscountPagedQueryResponse;
1246
- cart: ctp.CartPagedQueryResponse;
1247
- category: ctp.CategoryPagedQueryResponse;
1248
- channel: ctp.ChannelPagedQueryResponse;
1249
- "customer-email-token": never;
1250
- "customer-group": ctp.CustomerGroupPagedQueryResponse;
1251
- "customer-password-token": never;
1252
- customer: ctp.CustomerPagedQueryResponse;
1253
- "discount-code": ctp.DiscountCodePagedQueryResponse;
1254
- extension: ctp.ExtensionPagedQueryResponse;
1255
- "inventory-entry": ctp.InventoryPagedQueryResponse;
1256
- "key-value-document": ctp.CustomObjectPagedQueryResponse;
1257
- "order-edit": ctp.OrderEditPagedQueryResponse;
1258
- order: ctp.OrderPagedQueryResponse;
1259
- payment: ctp.PaymentPagedQueryResponse;
1260
- "product-discount": ctp.ProductDiscountPagedQueryResponse;
1261
- "product-price": ctp.StandalonePricePagedQueryResponse;
1262
- "product-projection": ctp.ProductProjectionPagedQueryResponse;
1263
- "product-selection": ctp.ProductSelectionPagedQueryResponse;
1264
- "product-tailoring": ctp.ProductTailoringPagedQueryResponse;
1265
- "product-type": ctp.ProductTypePagedQueryResponse;
1266
- product: ctp.ProductPagedQueryResponse;
1267
- "quote-request": ctp.QuoteRequestPagedQueryResponse;
1268
- quote: ctp.QuotePagedQueryResponse;
1269
- review: ctp.ReviewPagedQueryResponse;
1270
- "shipping-method": ctp.ShippingMethodPagedQueryResponse;
1271
- "shopping-list": ctp.ShoppingListPagedQueryResponse;
1272
- "staged-quote": ctp.StagedQuotePagedQueryResponse;
1273
- "standalone-price": ctp.StandalonePricePagedQueryResponse;
1274
- state: ctp.StatePagedQueryResponse;
1275
- store: ctp.StorePagedQueryResponse;
1276
- subscription: ctp.SubscriptionPagedQueryResponse;
1277
- "tax-category": ctp.TaxCategoryPagedQueryResponse;
1278
- type: ctp.TypePagedQueryResponse;
1279
- zone: ctp.ZonePagedQueryResponse;
1380
+ "attribute-group": ctp.AttributeGroupPagedQueryResponse;
1381
+ "associate-role": ctp.AssociateRolePagedQueryResponse;
1382
+ "business-unit": ctp.BusinessUnitPagedQueryResponse;
1383
+ "cart-discount": ctp.CartDiscountPagedQueryResponse;
1384
+ cart: ctp.CartPagedQueryResponse;
1385
+ category: ctp.CategoryPagedQueryResponse;
1386
+ channel: ctp.ChannelPagedQueryResponse;
1387
+ "customer-email-token": never;
1388
+ "customer-group": ctp.CustomerGroupPagedQueryResponse;
1389
+ "customer-password-token": never;
1390
+ customer: ctp.CustomerPagedQueryResponse;
1391
+ "discount-code": ctp.DiscountCodePagedQueryResponse;
1392
+ extension: ctp.ExtensionPagedQueryResponse;
1393
+ "inventory-entry": ctp.InventoryPagedQueryResponse;
1394
+ "key-value-document": ctp.CustomObjectPagedQueryResponse;
1395
+ "order-edit": ctp.OrderEditPagedQueryResponse;
1396
+ order: ctp.OrderPagedQueryResponse;
1397
+ payment: ctp.PaymentPagedQueryResponse;
1398
+ "product-discount": ctp.ProductDiscountPagedQueryResponse;
1399
+ "product-price": ctp.StandalonePricePagedQueryResponse;
1400
+ "product-projection": ctp.ProductProjectionPagedQueryResponse;
1401
+ "product-selection": ctp.ProductSelectionPagedQueryResponse;
1402
+ "product-tailoring": ctp.ProductTailoringPagedQueryResponse;
1403
+ "product-type": ctp.ProductTypePagedQueryResponse;
1404
+ product: ctp.ProductPagedQueryResponse;
1405
+ "quote-request": ctp.QuoteRequestPagedQueryResponse;
1406
+ quote: ctp.QuotePagedQueryResponse;
1407
+ review: ctp.ReviewPagedQueryResponse;
1408
+ "shipping-method": ctp.ShippingMethodPagedQueryResponse;
1409
+ "shopping-list": ctp.ShoppingListPagedQueryResponse;
1410
+ "staged-quote": ctp.StagedQuotePagedQueryResponse;
1411
+ "standalone-price": ctp.StandalonePricePagedQueryResponse;
1412
+ state: ctp.StatePagedQueryResponse;
1413
+ store: ctp.StorePagedQueryResponse;
1414
+ subscription: ctp.SubscriptionPagedQueryResponse;
1415
+ "tax-category": ctp.TaxCategoryPagedQueryResponse;
1416
+ type: ctp.TypePagedQueryResponse;
1417
+ zone: ctp.ZonePagedQueryResponse;
1280
1418
  };
1281
1419
 
1420
+ //#endregion
1421
+ //#region src/storage/abstract.d.ts
1282
1422
  type GetParams = {
1283
- expand?: string[];
1423
+ expand?: string[];
1284
1424
  };
1285
1425
  type QueryParams = {
1286
- expand?: string | string[];
1287
- sort?: string | string[];
1288
- limit?: number;
1289
- offset?: number;
1290
- withTotal?: boolean;
1291
- where?: string | string[];
1292
- [key: string]: QueryParam;
1426
+ expand?: string | string[];
1427
+ sort?: string | string[];
1428
+ limit?: number;
1429
+ offset?: number;
1430
+ withTotal?: boolean;
1431
+ where?: string | string[];
1432
+ [key: string]: QueryParam;
1293
1433
  };
1294
1434
  declare abstract class AbstractStorage {
1295
- abstract clear(): void;
1296
- abstract all<RT extends ResourceType>(projectKey: string, typeId: RT): Array<ResourceMap[RT]>;
1297
- abstract add<RT extends ResourceType>(projectKey: string, typeId: RT, obj: ResourceMap[RT]): ResourceMap[RT];
1298
- abstract get<RT extends ResourceType>(projectKey: string, typeId: RT, id: string, params?: GetParams): ResourceMap[RT] | null;
1299
- abstract getByKey<RT extends ResourceType>(projectKey: string, typeId: RT, key: string, params: GetParams): ResourceMap[RT] | null;
1300
- abstract addProject(projectKey: string): Project;
1301
- abstract getProject(projectKey: string): Project;
1302
- abstract saveProject(project: Project): Project;
1303
- abstract delete<RT extends ResourceType>(projectKey: string, typeId: RT, id: string, params: GetParams): ResourceMap[RT] | null;
1304
- abstract query<RT extends ResourceType>(projectKey: string, typeId: RT, params: QueryParams): PagedQueryResponseMap[RT];
1305
- abstract getByResourceIdentifier<RT extends ResourceType>(projectKey: string, identifier: ResourceIdentifier): ResourceMap[RT];
1306
- abstract expand<T>(projectKey: string, obj: T, clause: undefined | string | string[]): T;
1435
+ abstract clear(): void;
1436
+ abstract all<RT extends ResourceType>(projectKey: string, typeId: RT): Array<ResourceMap[RT]>;
1437
+ abstract add<RT extends ResourceType>(projectKey: string, typeId: RT, obj: ResourceMap[RT]): ResourceMap[RT];
1438
+ abstract get<RT extends ResourceType>(projectKey: string, typeId: RT, id: string, params?: GetParams): ResourceMap[RT] | null;
1439
+ abstract getByKey<RT extends ResourceType>(projectKey: string, typeId: RT, key: string, params: GetParams): ResourceMap[RT] | null;
1440
+ abstract addProject(projectKey: string): Project;
1441
+ abstract getProject(projectKey: string): Project;
1442
+ abstract saveProject(project: Project): Project;
1443
+ abstract delete<RT extends ResourceType>(projectKey: string, typeId: RT, id: string, params: GetParams): ResourceMap[RT] | null;
1444
+ abstract query<RT extends ResourceType>(projectKey: string, typeId: RT, params: QueryParams): PagedQueryResponseMap[RT];
1445
+ abstract getByResourceIdentifier<RT extends ResourceType>(projectKey: string, identifier: ResourceIdentifier): ResourceMap[RT];
1446
+ abstract expand<T>(projectKey: string, obj: T, clause: undefined | string | string[]): T;
1307
1447
  }
1308
1448
 
1449
+ //#endregion
1450
+ //#region src/config.d.ts
1309
1451
  type Config = {
1310
- strict: boolean;
1311
- storage: AbstractStorage;
1452
+ strict: boolean;
1453
+ storage: AbstractStorage;
1312
1454
  };
1313
1455
 
1456
+ //#endregion
1457
+ //#region src/projectAPI.d.ts
1314
1458
  declare class ProjectAPI {
1315
- private projectKey;
1316
- private _storage;
1317
- private _repositories;
1318
- private config;
1319
- constructor(projectKey: string, repositories: RepositoryMap, config: Config);
1320
- add<T extends keyof RepositoryMap & keyof ResourceMap>(typeId: T, resource: ResourceMap[T]): void;
1321
- unsafeAdd<T extends keyof RepositoryMap & keyof ResourceMap>(typeId: T, resource: ResourceMap[T]): void;
1322
- get<RT extends ResourceType>(typeId: RT, id: string, params?: GetParams$1): ResourceMap[RT];
1323
- getRepository<RT extends keyof RepositoryMap>(typeId: RT): RepositoryMap[RT];
1459
+ private projectKey;
1460
+ private _storage;
1461
+ private _repositories;
1462
+ private config;
1463
+ constructor(projectKey: string, repositories: RepositoryMap, config: Config);
1464
+ add<T extends keyof RepositoryMap & keyof ResourceMap>(typeId: T, resource: ResourceMap[T]): void;
1465
+ unsafeAdd<T extends keyof RepositoryMap & keyof ResourceMap>(typeId: T, resource: ResourceMap[T]): void;
1466
+ get<RT extends ResourceType>(typeId: RT, id: string, params?: GetParams$1): ResourceMap[RT];
1467
+ getRepository<RT extends keyof RepositoryMap>(typeId: RT): RepositoryMap[RT];
1324
1468
  }
1325
1469
 
1470
+ //#endregion
1471
+ //#region src/ctMock.d.ts
1326
1472
  type CommercetoolsMockOptions = {
1327
- validateCredentials: boolean;
1328
- enableAuthentication: boolean;
1329
- defaultProjectKey: string | undefined;
1330
- apiHost: RegExp | string;
1331
- authHost: RegExp | string;
1332
- silent: boolean;
1333
- strict: boolean;
1473
+ validateCredentials: boolean;
1474
+ enableAuthentication: boolean;
1475
+ defaultProjectKey: string | undefined;
1476
+ apiHost: RegExp | string;
1477
+ authHost: RegExp | string;
1478
+ silent: boolean;
1479
+ strict: boolean;
1334
1480
  };
1335
1481
  type AppOptions = {
1336
- silent?: boolean;
1482
+ silent?: boolean;
1337
1483
  };
1338
1484
  declare class CommercetoolsMock {
1339
- app: express.Express;
1340
- options: CommercetoolsMockOptions;
1341
- private _storage;
1342
- private _oauth2;
1343
- private _mswServer;
1344
- private _repositories;
1345
- private _projectService?;
1346
- constructor(options?: Partial<CommercetoolsMockOptions>);
1347
- start(): void;
1348
- stop(): void;
1349
- clear(): void;
1350
- project(projectKey?: string): ProjectAPI;
1351
- authStore(): OAuth2Store;
1352
- runServer(port?: number, options?: AppOptions): void;
1353
- private createApp;
1354
- registerHandlers(server: SetupServerApi): void;
1355
- getHandlers(): msw.HttpHandler[];
1356
- mswServer(): SetupServer | undefined;
1357
- private startServer;
1485
+ app: express.Express;
1486
+ options: CommercetoolsMockOptions;
1487
+ private _storage;
1488
+ private _oauth2;
1489
+ private _mswServer;
1490
+ private _repositories;
1491
+ private _projectService?;
1492
+ constructor(options?: Partial<CommercetoolsMockOptions>);
1493
+ start(): void;
1494
+ stop(): void;
1495
+ clear(): void;
1496
+ project(projectKey?: string): ProjectAPI;
1497
+ authStore(): OAuth2Store;
1498
+ runServer(port?: number, options?: AppOptions): void;
1499
+ private createApp;
1500
+ registerHandlers(server: SetupServerApi): void;
1501
+ getHandlers(): _1.HttpHandler[];
1502
+ mswServer(): SetupServer | undefined;
1503
+ private startServer;
1358
1504
  }
1359
1505
 
1506
+ //#endregion
1507
+ //#region src/helpers.d.ts
1360
1508
  declare const getBaseResourceProperties: () => {
1361
- id: string;
1362
- createdAt: string;
1363
- lastModifiedAt: string;
1364
- version: number;
1509
+ id: string;
1510
+ createdAt: string;
1511
+ lastModifiedAt: string;
1512
+ version: number;
1365
1513
  };
1366
1514
 
1367
- export { CommercetoolsMock, type CommercetoolsMockOptions, getBaseResourceProperties };
1515
+ //#endregion
1516
+ export { CommercetoolsMock, CommercetoolsMockOptions, getBaseResourceProperties };
1517
+ //# sourceMappingURL=index.d.ts.map