addio-admin-sdk 1.7.146 → 1.7.147
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/Interfaces/TCG/index.d.ts +7 -1
- package/dist/Interfaces/TCG/index.js +6 -0
- package/dist/Interfaces/TCG/index.js.map +1 -1
- package/dist/lib/Space/index.d.ts +7 -0
- package/dist/lib/Space/index.js +11 -1
- package/dist/lib/Space/index.js.map +1 -1
- package/dist/utils/tcgService.js +33 -15
- package/dist/utils/tcgService.js.map +1 -1
- package/package.json +1 -1
|
@@ -104,10 +104,16 @@ export declare enum TCGCardFinishEnum {
|
|
|
104
104
|
COLDFOIL = "cold-foil",
|
|
105
105
|
REVERSE_HOLOFOIL = "reverse-holofoil",
|
|
106
106
|
ETCHED = "etched",
|
|
107
|
+
RAINBOW_FOIL = "rainbow-foil",
|
|
107
108
|
UNLIMITED = "unlimited",
|
|
108
109
|
UNLIMITED_HOLOFOIL = "unlimited-holofoil",
|
|
110
|
+
UNLIMITED_NORMAL = "unlimited-edition-normal",
|
|
111
|
+
UNLIMITED_RAINBOWFOIL = "unlimited-edition-rainbow-foil",
|
|
109
112
|
FIRST_EDITION = "1st-edition",
|
|
110
|
-
|
|
113
|
+
FIRST_EDITION_NORMAL = "1st-edition-normal",
|
|
114
|
+
FIRST_EDITION_HOLOFOIL = "1st-edition-holofoil",
|
|
115
|
+
FIRST_EDITION_COLDFOIL = "1st-edition-cold-foil",
|
|
116
|
+
FIRST_EDITION_RAINBOWFOIL = "1st-edition-rainbow-foil"
|
|
111
117
|
}
|
|
112
118
|
export declare enum TCGAttributesEnum {
|
|
113
119
|
FINISH = "tcg_finish",
|
|
@@ -17,10 +17,16 @@ var TCGCardFinishEnum;
|
|
|
17
17
|
TCGCardFinishEnum["COLDFOIL"] = "cold-foil";
|
|
18
18
|
TCGCardFinishEnum["REVERSE_HOLOFOIL"] = "reverse-holofoil";
|
|
19
19
|
TCGCardFinishEnum["ETCHED"] = "etched";
|
|
20
|
+
TCGCardFinishEnum["RAINBOW_FOIL"] = "rainbow-foil";
|
|
20
21
|
TCGCardFinishEnum["UNLIMITED"] = "unlimited";
|
|
21
22
|
TCGCardFinishEnum["UNLIMITED_HOLOFOIL"] = "unlimited-holofoil";
|
|
23
|
+
TCGCardFinishEnum["UNLIMITED_NORMAL"] = "unlimited-edition-normal";
|
|
24
|
+
TCGCardFinishEnum["UNLIMITED_RAINBOWFOIL"] = "unlimited-edition-rainbow-foil";
|
|
22
25
|
TCGCardFinishEnum["FIRST_EDITION"] = "1st-edition";
|
|
26
|
+
TCGCardFinishEnum["FIRST_EDITION_NORMAL"] = "1st-edition-normal";
|
|
23
27
|
TCGCardFinishEnum["FIRST_EDITION_HOLOFOIL"] = "1st-edition-holofoil";
|
|
28
|
+
TCGCardFinishEnum["FIRST_EDITION_COLDFOIL"] = "1st-edition-cold-foil";
|
|
29
|
+
TCGCardFinishEnum["FIRST_EDITION_RAINBOWFOIL"] = "1st-edition-rainbow-foil";
|
|
24
30
|
})(TCGCardFinishEnum = exports.TCGCardFinishEnum || (exports.TCGCardFinishEnum = {}));
|
|
25
31
|
var TCGAttributesEnum;
|
|
26
32
|
(function (TCGAttributesEnum) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Interfaces/TCG/index.ts"],"names":[],"mappings":";;;AA8FA,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAChC,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACtB,CAAC,EALW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAKhC;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Interfaces/TCG/index.ts"],"names":[],"mappings":";;;AA8FA,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAChC,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;IACjB,8C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B,0CAAmB,CAAA;AACpB,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B;AACD,aAAa"}
|
|
@@ -656,6 +656,12 @@ export default class Space {
|
|
|
656
656
|
* @returns Array of corresponding Interaction history entries, ordered by oldest to newest. If not date provided in options, returns max 100 entries. Else returns all found.
|
|
657
657
|
*/
|
|
658
658
|
private _getInteractionHistoryForDrawer;
|
|
659
|
+
/**
|
|
660
|
+
* Open a cash drawer by generating associated cash drawer shift
|
|
661
|
+
* @param drawerId The id of the drawer to open
|
|
662
|
+
* @param cashDownAmount The amount to set as in cash drawer on open
|
|
663
|
+
*/
|
|
664
|
+
private _openCashDrawer;
|
|
659
665
|
attributes: {
|
|
660
666
|
get: (options?: IQueryOptions) => Promise<Attribute[]>;
|
|
661
667
|
add: (attribute: IAttribute) => Promise<void>;
|
|
@@ -1125,6 +1131,7 @@ export default class Space {
|
|
|
1125
1131
|
end?: Date;
|
|
1126
1132
|
};
|
|
1127
1133
|
}) => Promise<ICashDrawerInteraction[]>;
|
|
1134
|
+
open: (drawerId: string, cashDownAmount: number) => Promise<boolean>;
|
|
1128
1135
|
};
|
|
1129
1136
|
/**
|
|
1130
1137
|
* Get all space properties
|
package/dist/lib/Space/index.js
CHANGED
|
@@ -5264,6 +5264,15 @@ class Space {
|
|
|
5264
5264
|
const filteredDocs = docs.filter((d) => d.exists && !!d.data).map((d) => d.data);
|
|
5265
5265
|
return filteredDocs;
|
|
5266
5266
|
};
|
|
5267
|
+
/**
|
|
5268
|
+
* Open a cash drawer by generating associated cash drawer shift
|
|
5269
|
+
* @param drawerId The id of the drawer to open
|
|
5270
|
+
* @param cashDownAmount The amount to set as in cash drawer on open
|
|
5271
|
+
*/
|
|
5272
|
+
this._openCashDrawer = async (drawerId, cashDownAmount) => {
|
|
5273
|
+
const opened = await CashDrawerShift_1.default.openShift(cashDownAmount, this, drawerId, this._user);
|
|
5274
|
+
return !!opened.data().is_open;
|
|
5275
|
+
};
|
|
5267
5276
|
// #endregion
|
|
5268
5277
|
// -------------------------------------------------------------------------------
|
|
5269
5278
|
// #region PUBLIC GETTER FUNCTIONS
|
|
@@ -5659,7 +5668,8 @@ class Space {
|
|
|
5659
5668
|
toggle: this._toggleCashDrawer,
|
|
5660
5669
|
hasOpenShift: this._checkIfOpenShiftExistsForDrawer,
|
|
5661
5670
|
getOpenShift: this._getOpenShiftForDrawer,
|
|
5662
|
-
getInteractionHistory: this._getInteractionHistoryForDrawer
|
|
5671
|
+
getInteractionHistory: this._getInteractionHistoryForDrawer,
|
|
5672
|
+
open: this._openCashDrawer
|
|
5663
5673
|
};
|
|
5664
5674
|
// #endregion
|
|
5665
5675
|
/**
|