@vendure/common
Advanced tools
Comparing version 2.0.0-next.28 to 2.0.0
@@ -1,3 +0,3 @@ | ||
export declare type FetchPolicy = 'cache-first' | 'network-only' | 'cache-only' | 'no-cache' | 'standby'; | ||
export declare type WatchQueryFetchPolicy = FetchPolicy | 'cache-and-network'; | ||
export type FetchPolicy = 'cache-first' | 'network-only' | 'cache-only' | 'no-cache' | 'standby'; | ||
export type WatchQueryFetchPolicy = FetchPolicy | 'cache-and-network'; | ||
export interface BaseExtensionMessage { | ||
@@ -61,3 +61,3 @@ requestId: string; | ||
} | ||
export declare type ExtensionMessage = ActivatedRouteMessage | QueryMessage | MutationMessage | NotificationMessage | CancellationMessage | DestroyMessage; | ||
export type ExtensionMessage = ActivatedRouteMessage | QueryMessage | MutationMessage | NotificationMessage | CancellationMessage | DestroyMessage; | ||
export interface MessageResponse { | ||
@@ -64,0 +64,0 @@ requestId: string; |
@@ -353,2 +353,3 @@ "use strict"; | ||
ErrorCode["EMAIL_ADDRESS_CONFLICT_ERROR"] = "EMAIL_ADDRESS_CONFLICT_ERROR"; | ||
ErrorCode["GUEST_CHECKOUT_ERROR"] = "GUEST_CHECKOUT_ERROR"; | ||
ErrorCode["IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR"] = "IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR"; | ||
@@ -817,2 +818,4 @@ ErrorCode["IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR"] = "IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR"; | ||
Permission["CreateShippingMethod"] = "CreateShippingMethod"; | ||
/** Grants permission to create StockLocation */ | ||
Permission["CreateStockLocation"] = "CreateStockLocation"; | ||
/** Grants permission to create System */ | ||
@@ -860,2 +863,4 @@ Permission["CreateSystem"] = "CreateSystem"; | ||
Permission["DeleteShippingMethod"] = "DeleteShippingMethod"; | ||
/** Grants permission to delete StockLocation */ | ||
Permission["DeleteStockLocation"] = "DeleteStockLocation"; | ||
/** Grants permission to delete System */ | ||
@@ -907,2 +912,4 @@ Permission["DeleteSystem"] = "DeleteSystem"; | ||
Permission["ReadShippingMethod"] = "ReadShippingMethod"; | ||
/** Grants permission to read StockLocation */ | ||
Permission["ReadStockLocation"] = "ReadStockLocation"; | ||
/** Grants permission to read System */ | ||
@@ -954,2 +961,4 @@ Permission["ReadSystem"] = "ReadSystem"; | ||
Permission["UpdateShippingMethod"] = "UpdateShippingMethod"; | ||
/** Grants permission to update StockLocation */ | ||
Permission["UpdateStockLocation"] = "UpdateStockLocation"; | ||
/** Grants permission to update System */ | ||
@@ -956,0 +965,0 @@ Permission["UpdateSystem"] = "UpdateSystem"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StockMovementType = exports.SortOrder = exports.Permission = exports.OrderType = exports.LogicalOperator = exports.LanguageCode = exports.JobState = exports.HistoryEntryType = exports.GlobalFlag = exports.ErrorCode = exports.DeletionResult = exports.CurrencyCode = exports.AssetType = exports.AdjustmentType = void 0; | ||
exports.StockMovementType = exports.SortOrder = exports.Permission = exports.OrderType = exports.MetricType = exports.MetricInterval = exports.LogicalOperator = exports.LanguageCode = exports.JobState = exports.HistoryEntryType = exports.GlobalFlag = exports.ErrorCode = exports.DeletionResult = exports.CurrencyCode = exports.AssetType = exports.AdjustmentType = void 0; | ||
var AdjustmentType; | ||
@@ -360,2 +360,3 @@ (function (AdjustmentType) { | ||
ErrorCode["FULFILLMENT_STATE_TRANSITION_ERROR"] = "FULFILLMENT_STATE_TRANSITION_ERROR"; | ||
ErrorCode["GUEST_CHECKOUT_ERROR"] = "GUEST_CHECKOUT_ERROR"; | ||
ErrorCode["INELIGIBLE_SHIPPING_METHOD_ERROR"] = "INELIGIBLE_SHIPPING_METHOD_ERROR"; | ||
@@ -771,2 +772,12 @@ ErrorCode["INSUFFICIENT_STOCK_ERROR"] = "INSUFFICIENT_STOCK_ERROR"; | ||
})(LogicalOperator = exports.LogicalOperator || (exports.LogicalOperator = {})); | ||
var MetricInterval; | ||
(function (MetricInterval) { | ||
MetricInterval["Daily"] = "Daily"; | ||
})(MetricInterval = exports.MetricInterval || (exports.MetricInterval = {})); | ||
var MetricType; | ||
(function (MetricType) { | ||
MetricType["AverageOrderValue"] = "AverageOrderValue"; | ||
MetricType["OrderCount"] = "OrderCount"; | ||
MetricType["OrderTotal"] = "OrderTotal"; | ||
})(MetricType = exports.MetricType || (exports.MetricType = {})); | ||
var OrderType; | ||
@@ -846,2 +857,4 @@ (function (OrderType) { | ||
Permission["CreateShippingMethod"] = "CreateShippingMethod"; | ||
/** Grants permission to create StockLocation */ | ||
Permission["CreateStockLocation"] = "CreateStockLocation"; | ||
/** Grants permission to create System */ | ||
@@ -889,2 +902,4 @@ Permission["CreateSystem"] = "CreateSystem"; | ||
Permission["DeleteShippingMethod"] = "DeleteShippingMethod"; | ||
/** Grants permission to delete StockLocation */ | ||
Permission["DeleteStockLocation"] = "DeleteStockLocation"; | ||
/** Grants permission to delete System */ | ||
@@ -936,2 +951,4 @@ Permission["DeleteSystem"] = "DeleteSystem"; | ||
Permission["ReadShippingMethod"] = "ReadShippingMethod"; | ||
/** Grants permission to read StockLocation */ | ||
Permission["ReadStockLocation"] = "ReadStockLocation"; | ||
/** Grants permission to read System */ | ||
@@ -983,2 +1000,4 @@ Permission["ReadSystem"] = "ReadSystem"; | ||
Permission["UpdateShippingMethod"] = "UpdateShippingMethod"; | ||
/** Grants permission to update StockLocation */ | ||
Permission["UpdateStockLocation"] = "UpdateStockLocation"; | ||
/** Grants permission to update System */ | ||
@@ -985,0 +1004,0 @@ Permission["UpdateSystem"] = "UpdateSystem"; |
@@ -1,2 +0,2 @@ | ||
export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; | ||
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; | ||
/** | ||
@@ -3,0 +3,0 @@ * Type-safe omit function - returns a new object which omits the specified keys. |
@@ -13,3 +13,3 @@ export declare const API_PORT = 3000; | ||
export declare const DEFAULT_AUTH_TOKEN_HEADER_KEY = "vendure-auth-token"; | ||
export declare type CREATING_VENDURE_APP = 'CREATING_VENDURE_APP'; | ||
export type CREATING_VENDURE_APP = 'CREATING_VENDURE_APP'; | ||
export declare const CREATING_VENDURE_APP: CREATING_VENDURE_APP; |
@@ -6,3 +6,3 @@ import { LanguageCode, LocalizedString } from './generated-types'; | ||
*/ | ||
export declare type DeepPartial<T> = { | ||
export type DeepPartial<T> = { | ||
[P in keyof T]?: null | (T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : DeepPartial<T[P]>); | ||
@@ -14,3 +14,3 @@ }; | ||
*/ | ||
export declare type DeepRequired<T, U extends object | undefined = undefined> = T extends object ? { | ||
export type DeepRequired<T, U extends object | undefined = undefined> = T extends object ? { | ||
[P in keyof T]-?: NonNullable<T[P]> extends NonNullable<U | Function | Type<any>> ? NonNullable<T[P]> : DeepRequired<NonNullable<T[P]>, U>; | ||
@@ -24,3 +24,3 @@ } : T; | ||
} | ||
export declare type Json = null | boolean | number | string | Json[] | { | ||
export type Json = null | boolean | number | string | Json[] | { | ||
[prop: string]: Json; | ||
@@ -35,3 +35,3 @@ }; | ||
*/ | ||
export declare type JsonCompatible<T> = { | ||
export type JsonCompatible<T> = { | ||
[P in keyof T]: T[P] extends Json ? T[P] : Pick<T, P> extends Required<Pick<T, P>> ? never : JsonCompatible<T[P]>; | ||
@@ -46,3 +46,3 @@ }; | ||
*/ | ||
export declare type PaginatedList<T> = { | ||
export type PaginatedList<T> = { | ||
items: T[]; | ||
@@ -58,3 +58,3 @@ totalItems: number; | ||
*/ | ||
export declare type ID = string | number; | ||
export type ID = string | number; | ||
/** | ||
@@ -70,2 +70,3 @@ * @description | ||
* text | longtext(m), text(p,s) | String | ||
* localText | longtext(m), text(p,s) | String | ||
* int | int | Int | ||
@@ -82,3 +83,3 @@ * float | double precision | Float | ||
*/ | ||
export declare type CustomFieldType = 'string' | 'localeString' | 'int' | 'float' | 'boolean' | 'datetime' | 'relation' | 'text'; | ||
export type CustomFieldType = 'string' | 'localeString' | 'int' | 'float' | 'boolean' | 'datetime' | 'relation' | 'text' | 'localeText'; | ||
/** | ||
@@ -96,3 +97,3 @@ * @description | ||
*/ | ||
export declare type ConfigArgType = 'string' | 'int' | 'float' | 'boolean' | 'datetime' | 'ID'; | ||
export type ConfigArgType = 'string' | 'int' | 'float' | 'boolean' | 'datetime' | 'ID'; | ||
/** | ||
@@ -105,3 +106,3 @@ * @description | ||
*/ | ||
export declare type DefaultFormComponentId = 'boolean-form-input' | 'currency-form-input' | 'customer-group-form-input' | 'date-form-input' | 'facet-value-form-input' | 'json-editor-form-input' | 'html-editor-form-input' | 'number-form-input' | 'password-form-input' | 'product-selector-form-input' | 'relation-form-input' | 'rich-text-form-input' | 'select-form-input' | 'text-form-input' | 'textarea-form-input' | 'asset-form-input' | 'product-multi-form-input' | 'combination-mode-form-input'; | ||
export type DefaultFormComponentId = 'boolean-form-input' | 'currency-form-input' | 'customer-group-form-input' | 'date-form-input' | 'facet-value-form-input' | 'json-editor-form-input' | 'html-editor-form-input' | 'number-form-input' | 'password-form-input' | 'product-selector-form-input' | 'relation-form-input' | 'rich-text-form-input' | 'select-form-input' | 'text-form-input' | 'textarea-form-input' | 'asset-form-input' | 'product-multi-form-input' | 'combination-mode-form-input'; | ||
/** | ||
@@ -113,6 +114,6 @@ * @description | ||
*/ | ||
declare type DefaultFormConfigHash = { | ||
'boolean-form-input': {}; | ||
'currency-form-input': {}; | ||
'customer-group-form-input': {}; | ||
type DefaultFormConfigHash = { | ||
'boolean-form-input': Record<string, never>; | ||
'currency-form-input': Record<string, never>; | ||
'customer-group-form-input': Record<string, never>; | ||
'date-form-input': { | ||
@@ -123,3 +124,3 @@ min?: string; | ||
}; | ||
'facet-value-form-input': {}; | ||
'facet-value-form-input': Record<string, never>; | ||
'json-editor-form-input': { | ||
@@ -138,6 +139,6 @@ height?: string; | ||
}; | ||
'password-form-input': {}; | ||
'product-selector-form-input': {}; | ||
'relation-form-input': {}; | ||
'rich-text-form-input': {}; | ||
'password-form-input': Record<string, never>; | ||
'product-selector-form-input': Record<string, never>; | ||
'relation-form-input': Record<string, never>; | ||
'rich-text-form-input': Record<string, never>; | ||
'select-form-input': { | ||
@@ -156,13 +157,13 @@ options?: Array<{ | ||
}; | ||
'asset-form-input': {}; | ||
'asset-form-input': Record<string, never>; | ||
'product-multi-form-input': { | ||
selectionMode?: 'product' | 'variant'; | ||
}; | ||
'combination-mode-form-input': {}; | ||
'combination-mode-form-input': Record<string, never>; | ||
}; | ||
export declare type DefaultFormComponentUiConfig<T extends DefaultFormComponentId | string> = T extends DefaultFormComponentId ? DefaultFormConfigHash[T] : any; | ||
export declare type DefaultFormComponentConfig<T extends DefaultFormComponentId | string> = DefaultFormComponentUiConfig<T> & { | ||
export type DefaultFormComponentUiConfig<T extends DefaultFormComponentId | string> = T extends DefaultFormComponentId ? DefaultFormConfigHash[T] : any; | ||
export type DefaultFormComponentConfig<T extends DefaultFormComponentId | string> = DefaultFormComponentUiConfig<T> & { | ||
ui?: DefaultFormComponentUiConfig<T>; | ||
}; | ||
export declare type UiComponentConfig<T extends DefaultFormComponentId | string> = T extends DefaultFormComponentId ? { | ||
export type UiComponentConfig<T extends DefaultFormComponentId | string> = T extends DefaultFormComponentId ? { | ||
component: T; | ||
@@ -175,3 +176,3 @@ tab?: string; | ||
}; | ||
export declare type CustomFieldsObject = { | ||
export type CustomFieldsObject = { | ||
[key: string]: any; | ||
@@ -185,3 +186,3 @@ }; | ||
* | ||
* @docsCategory AdminUiPlugin | ||
* @docsCategory core plugins/AdminUiPlugin | ||
*/ | ||
@@ -302,3 +303,3 @@ export interface AdminUiConfig { | ||
* | ||
* @docsCategory common | ||
* @docsCategory core plugins/AdminUiPlugin | ||
*/ | ||
@@ -330,3 +331,3 @@ export interface AdminUiAppConfig { | ||
* | ||
* @docsCategory common | ||
* @docsCategory core plugins/AdminUiPlugin | ||
*/ | ||
@@ -333,0 +334,0 @@ export interface AdminUiAppDevModeConfig { |
@@ -16,8 +16,9 @@ /** | ||
export declare function isClassInstance(item: any): boolean; | ||
declare type NumericPropsOf<T> = { | ||
type NumericPropsOf<T> = { | ||
[K in keyof T]: T[K] extends number ? K : never; | ||
}[keyof T]; | ||
declare type OnlyNumerics<T> = { | ||
[K in NumericPropsOf<T>]: T[K]; | ||
type NPO<T, KT extends keyof T> = { | ||
[K in KT]: T[K] extends string | number | boolean ? T[K] : T[K] extends Array<infer A> ? Array<OnlyNumerics<A>> : OnlyNumerics<T[K]>; | ||
}; | ||
type OnlyNumerics<T> = NPO<T, NumericPropsOf<T>>; | ||
/** | ||
@@ -24,0 +25,0 @@ * Adds up all the values of a given numeric property of a list of objects. |
@@ -64,7 +64,7 @@ "use strict"; | ||
else { | ||
// tslint:disable:prefer-for-of | ||
/* eslint-disable @typescript-eslint/prefer-for-of */ | ||
for (let i = 0; i < optionGroups[k].length; i++) { | ||
generateAllCombinations(optionGroups, combination.concat(optionGroups[k][i]), k + 1, output); | ||
} | ||
// tslint:enable:prefer-for-of | ||
/* eslint-enable @typescript-eslint/prefer-for-of */ | ||
return output; | ||
@@ -71,0 +71,0 @@ } |
{ | ||
"name": "@vendure/common", | ||
"version": "2.0.0-next.28", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"watch": "tsc -p ./tsconfig.build.json -w", | ||
"build": "rimraf lib && tsc -p ./tsconfig.build.json", | ||
"lint": "tslint --fix --project ./", | ||
"test": "jest --config ./jest.config.js", | ||
"ci": "yarn build" | ||
}, | ||
"homepage": "https://www.vendure.io/", | ||
"funding": "https://github.com/sponsors/michaelbromley", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"lib/**/*" | ||
], | ||
"devDependencies": { | ||
"rimraf": "^3.0.2", | ||
"typescript": "4.5.5" | ||
}, | ||
"gitHead": "6811d6554afbb0e0d993da4788499bcd3563d5ab" | ||
"name": "@vendure/common", | ||
"version": "2.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"watch": "tsc -p ./tsconfig.build.json -w", | ||
"build": "rimraf lib && tsc -p ./tsconfig.build.json", | ||
"lint": "eslint --fix .", | ||
"test": "vitest --run", | ||
"ci": "yarn build" | ||
}, | ||
"homepage": "https://www.vendure.io/", | ||
"funding": "https://github.com/sponsors/michaelbromley", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"lib/**/*" | ||
], | ||
"devDependencies": { | ||
"rimraf": "^3.0.2", | ||
"typescript": "4.9.5" | ||
}, | ||
"gitHead": "302bd68796e0136f70dd199369616d362c920ea4" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
434568
11285
0