@salla.sa/twilight 2.6.6 → 2.6.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight",
3
- "version": "2.6.6",
3
+ "version": "2.6.8",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1,42 +0,0 @@
1
- import { SuccessResponse } from "../common";
2
-
3
- export interface Scope {
4
- id: number;
5
- name: string;
6
- selected: boolean;
7
- }
8
-
9
- export interface ProductAvailability {
10
- name: string;
11
- selected: boolean;
12
- availability: Availability;
13
- }
14
-
15
- export interface Availability {
16
- label: string;
17
- key: string;
18
- color: string;
19
- }
20
-
21
-
22
- export namespace ScopeApiResponse {
23
-
24
- export interface scopeList extends SuccessResponse {
25
- data: Scope[];
26
- }
27
-
28
- export interface scopeAddition extends SuccessResponse {
29
- data: Scope
30
- }
31
-
32
- export interface availability extends SuccessResponse {
33
- data: ProductAvailability[];
34
- }
35
- }
36
-
37
-
38
- export default interface ScopeApi {
39
- get: () => Promise<ScopeApiResponse.scopeList>
40
- createScope: (payload: Object) => Promise<SuccessResponse>
41
- getProductAvailability: (product_id: number) => Promise<ScopeApiResponse.availability>
42
- }
@@ -1,14 +0,0 @@
1
- import { RequestErrorEvent } from "../common";
2
- import { ScopeApiResponse } from '../api/branches'
3
-
4
- export default interface BranchesEvent {
5
- onScopeFetched: (callback: (response: ScopeApiResponse.scopeList) => void) => void;
6
- onScopeFetchFailed: RequestErrorEvent;
7
- // POST
8
- onNewScopeSubmitted: (callback: (response: ScopeApiResponse.scopeAddition) => void) => void;
9
- onscopeChangeFailed: RequestErrorEvent;
10
-
11
- // Availability
12
- onproductAvailableFetched: (callback: (response: ScopeApiResponse.availability, product_id: number) => void) => void;
13
- onProductAvailabilityFetchFailed: RequestErrorEvent;
14
- }