crmbonus-component-wake 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/dist/components/giftback-pin.d.ts +11 -0
  2. package/dist/components/giftback-progress.d.ts +11 -0
  3. package/dist/components/phone-input.d.ts +11 -0
  4. package/dist/crmbonus-component-wake/app-modal.entry.js +2 -2
  5. package/dist/crmbonus-component-wake/crm-bonus-form.entry.js +3865 -6
  6. package/dist/crmbonus-component-wake/crm-bonus-form.entry.js.map +1 -1
  7. package/dist/crmbonus-component-wake/crm-bonus.entry.js +3 -3
  8. package/dist/crmbonus-component-wake/crm-bonus.entry.js.map +1 -1
  9. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +3 -3
  10. package/dist/crmbonus-component-wake/giftback-pin.entry.js +38 -0
  11. package/dist/crmbonus-component-wake/giftback-pin.entry.js.map +1 -0
  12. package/dist/crmbonus-component-wake/giftback-progress.entry.js +26 -0
  13. package/dist/crmbonus-component-wake/giftback-progress.entry.js.map +1 -0
  14. package/dist/crmbonus-component-wake/{index-144d2e69.js → index-71c2c4ae.js} +2 -2
  15. package/dist/crmbonus-component-wake/index-71c2c4ae.js.map +1 -0
  16. package/dist/crmbonus-component-wake/{index-f4f9c8f2.js → index-eeb8f9f2.js} +2 -2
  17. package/dist/crmbonus-component-wake/{index-144d2e69.js.map → index-eeb8f9f2.js.map} +1 -1
  18. package/dist/crmbonus-component-wake/phone-input-mask.entry.js +3 -3
  19. package/dist/crmbonus-component-wake/phone-input-mask.entry.js.map +1 -1
  20. package/dist/crmbonus-component-wake/phone-input.entry.js +20 -0
  21. package/dist/crmbonus-component-wake/phone-input.entry.js.map +1 -0
  22. package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
  23. package/dist/types/components/crm-bonus-form/crm-bonus-form.d.ts +9 -2
  24. package/dist/types/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.d.ts +10 -0
  25. package/dist/types/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.d.ts +8 -0
  26. package/dist/types/components/crm-bonus-form/subcomponents/phone/phone.input.d.ts +7 -0
  27. package/dist/types/components/phone/phone-input-mask.d.ts +1 -1
  28. package/dist/types/components.d.ts +58 -1
  29. package/dist/types/dto/pin.sent.d.ts +4 -0
  30. package/dist/types/dto/validate.pin.bonus.d.ts +13 -0
  31. package/dist/types/home/darlison/Projects/crmbonus/crmbonus-component-wake/.stencil/env.d.ts +4 -0
  32. package/dist/types/services/crmbonus.service.d.ts +6 -0
  33. package/package.json +5 -2
  34. package/dist/crmbonus-component-wake/index-2aa8671b.js +0 -3039
  35. package/dist/crmbonus-component-wake/index-2aa8671b.js.map +0 -1
  36. package/dist/crmbonus-component-wake/index-f4f9c8f2.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-f4f9c8f2.js';
1
+ import { r as registerInstance, h } from './index-71c2c4ae.js';
2
2
 
3
3
  const phoneInputMaskCss = ".inline-text-field-container{display:flex;flex-direction:column}@supports (top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined{height:55px;overflow:visible}.phone{width:300px;height:50px;font-size:18px;padding:10px;color:grey;border:1px solid #d3c6c6;outline:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity, transform, color}";
4
4
 
@@ -21,11 +21,11 @@ const PhoneInputMask = class {
21
21
  const input = event.target;
22
22
  this.phone = this.formatPhone(input.value);
23
23
  }
24
- getPhone() {
24
+ async getPhone() {
25
25
  return this.phone;
26
26
  }
27
27
  render() {
28
- return (h("input", { key: '7cef9f711e8e4378f90b8bbcefc1a2808ca3377d', id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
28
+ return (h("input", { key: 'ce14900d1782c63886bc96130d1af61953d5f5a8', id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
29
29
  }
30
30
  };
31
31
  PhoneInputMask.style = phoneInputMaskCss;
@@ -1 +1 @@
1
- {"file":"phone-input-mask.entry.esm.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,+zBAA+zB;;MCO50B,cAAc;;;qBACE,EAAE;;IAEnB,WAAW,CAAC,KAAa;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAE7C,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;KACrC;IAEO,WAAW,CAAC,KAAY;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC9C;IAGM,QAAQ;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,MAAM;QACF,QACI,8DACI,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,KAAK,EACV,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACJ;KACL;;;;;;","names":[],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":[".inline-text-field-container {\n display: flex;\n flex-direction: column;\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-right: max(16px, var(--mdc-shape-small, 4px));\n }\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-left: max(16px, calc(var(--mdc-shape-small, 4px) + 4px));\n }\n}\n\n.mdc-text-field--outlined {\n height: 55px;\n overflow: visible;\n}\n\n.phone {\n width: 300px;\n height: 50px;\n font-size: 18px;\n padding: 10px;\n color: grey;\n border: 1px solid #d3c6c6;\n outline: none;\n}\n\n.mdc-text-field {\n border-top-left-radius: 4px;\n border-top-left-radius: var(--mdc-shape-small, 4px);\n border-top-right-radius: 4px;\n border-top-right-radius: var(--mdc-shape-small, 4px);\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n display: inline-flex;\n align-items: baseline;\n padding: 0 16px;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n will-change: opacity, transform, color;\n}","import { Component, h, Method, State } from '@stencil/core';\n\n@Component({\n tag: 'phone-input-mask',\n styleUrl: 'phone-input-mask.css',\n shadow: true,\n})\nexport class PhoneInputMask {\n @State() phone: string = '';\n\n private formatPhone(value: string): string {\n const cleaned = value.replace(/\\D/g, ''); // Remove tudo que não for número\n const match = cleaned.match(/^(\\d{0,2})(\\d{0,5})(\\d{0,4})$/);\n if (!match) return value;\n\n const part1 = match[1] ? `(${match[1]}` : '';\n const part2 = match[2] ? `) ${match[2]}` : '';\n const part3 = match[3] ? `-${match[3]}` : '';\n\n return `${part1}${part2}${part3}`;\n }\n\n private handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.phone = this.formatPhone(input.value);\n }\n\n @Method()\n public getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <input\n id=\"phone\"\n type=\"tel\"\n class=\"phone\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567-8910\"\n />\n );\n }\n}\n"],"version":3}
1
+ {"file":"phone-input-mask.entry.esm.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,+zBAA+zB;;MCO50B,cAAc;;;qBACE,EAAE;;IAEnB,WAAW,CAAC,KAAa;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAE7C,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;KACrC;IAEO,WAAW,CAAC,KAAY;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC9C;IAGM,MAAM,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,MAAM;QACF,QACI,8DACI,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,KAAK,EACV,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACJ;KACL;;;;;;","names":[],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":[".inline-text-field-container {\n display: flex;\n flex-direction: column;\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-right: max(16px, var(--mdc-shape-small, 4px));\n }\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-left: max(16px, calc(var(--mdc-shape-small, 4px) + 4px));\n }\n}\n\n.mdc-text-field--outlined {\n height: 55px;\n overflow: visible;\n}\n\n.phone {\n width: 300px;\n height: 50px;\n font-size: 18px;\n padding: 10px;\n color: grey;\n border: 1px solid #d3c6c6;\n outline: none;\n}\n\n.mdc-text-field {\n border-top-left-radius: 4px;\n border-top-left-radius: var(--mdc-shape-small, 4px);\n border-top-right-radius: 4px;\n border-top-right-radius: var(--mdc-shape-small, 4px);\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n display: inline-flex;\n align-items: baseline;\n padding: 0 16px;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n will-change: opacity, transform, color;\n}","import { Component, h, Method, State } from '@stencil/core';\n\n@Component({\n tag: 'phone-input-mask',\n styleUrl: 'phone-input-mask.css',\n shadow: true,\n})\nexport class PhoneInputMask {\n @State() phone: string = '';\n\n private formatPhone(value: string): string {\n const cleaned = value.replace(/\\D/g, ''); // Remove tudo que não for número\n const match = cleaned.match(/^(\\d{0,2})(\\d{0,5})(\\d{0,4})$/);\n if (!match) return value;\n\n const part1 = match[1] ? `(${match[1]}` : '';\n const part2 = match[2] ? `) ${match[2]}` : '';\n const part3 = match[3] ? `-${match[3]}` : '';\n\n return `${part1}${part2}${part3}`;\n }\n\n private handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.phone = this.formatPhone(input.value);\n }\n\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <input\n id=\"phone\"\n type=\"tel\"\n class=\"phone\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567-8910\"\n />\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,20 @@
1
+ import { r as registerInstance, h } from './index-71c2c4ae.js';
2
+
3
+ const PhoneInput = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ this.sendPin = undefined;
7
+ this.loading = undefined;
8
+ }
9
+ async validatePhone() {
10
+ const phone = await this.phoneInputMask.getPhone();
11
+ await this.sendPin(phone);
12
+ }
13
+ render() {
14
+ return (h("div", { key: '44dcf42dff601aa838ccfab5af6b3bbe4be73d14', class: "form-container" }, h("phone-input-mask", { key: 'c8b84771c1db014b0be4fc3ae04a91e7501c386a', ref: ref => this.phoneInputMask = ref }), h("button", { key: 'f61cf41450dd0485ef51c429f66ed878de3bf89e', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, "validar")));
15
+ }
16
+ };
17
+
18
+ export { PhoneInput as phone_input };
19
+
20
+ //# sourceMappingURL=phone-input.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"phone-input.entry.esm.js","mappings":";;MAKa,UAAU;;;;;;IAOnB,MAAM,aAAa;QACf,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QACnD,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAC7B;IAED,MAAM;QACF,QACI,4DAAK,KAAK,EAAC,gBAAgB,IACvB,yEAAkB,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,GAAG,GAAG,GAAI,EAC3D,+DAAQ,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,cAAkB,CACvI,EACT;KACJ;;;;;","names":[],"sources":["src/components/crm-bonus-form/subcomponents/phone/phone.input.tsx"],"sourcesContent":["import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'phone-input'\n})\nexport class PhoneInput {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() sendPin: Function;\n @Prop() loading: boolean;\n\n async validatePhone() {\n const phone = await this.phoneInputMask.getPhone();\n await this.sendPin(phone);\n }\n\n render() {\n return (\n <div class=\"form-container\">\n <phone-input-mask ref={ref => this.phoneInputMask = ref} />\n <button class={`button ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePhone()}>validar</button>\n </div>\n )\n }\n}"],"version":3}
@@ -1,5 +1,6 @@
1
1
  export declare class MyComponent {
2
2
  showModal: boolean;
3
3
  userId: string;
4
+ storeName: any;
4
5
  render(): any;
5
6
  }
@@ -1,5 +1,12 @@
1
+ import { IPinSent } from "../../components";
2
+ import { IValidatePinBonus } from "../../dto/validate.pin.bonus";
1
3
  export declare class CrmBonusForm {
2
- private phoneInputMask;
3
- validate(): Promise<void>;
4
+ private crmBonusService;
5
+ storeName: any;
6
+ loading: boolean;
7
+ step: number;
8
+ sent: IPinSent;
9
+ sendPin(phone: string): Promise<void>;
10
+ validateBonus(data: IValidatePinBonus): Promise<void>;
4
11
  render(): any;
5
12
  }
@@ -0,0 +1,10 @@
1
+ import { IPinSent } from '../../../../dto/pin.sent';
2
+ export declare class GiftbackPin {
3
+ sent: IPinSent;
4
+ pin: string[];
5
+ isVerified: boolean;
6
+ loading: boolean;
7
+ handleInput(event: Event, index: number): void;
8
+ verifyPin(): void;
9
+ render(): any;
10
+ }
@@ -0,0 +1,8 @@
1
+ export declare class GiftbackProgress {
2
+ maxValue: number;
3
+ totalGiftback: number;
4
+ validityDate: string;
5
+ usedValue: number;
6
+ handleSliderChange(event: Event): void;
7
+ render(): any;
8
+ }
@@ -0,0 +1,7 @@
1
+ export declare class PhoneInput {
2
+ private phoneInputMask;
3
+ sendPin: Function;
4
+ loading: boolean;
5
+ validatePhone(): Promise<void>;
6
+ render(): any;
7
+ }
@@ -2,6 +2,6 @@ export declare class PhoneInputMask {
2
2
  phone: string;
3
3
  private formatPhone;
4
4
  private handleInput;
5
- getPhone(): string;
5
+ getPhone(): Promise<string>;
6
6
  render(): any;
7
7
  }
@@ -5,18 +5,34 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { IPinSent } from "./dto/pin.sent";
9
+ export { IPinSent } from "./dto/pin.sent";
8
10
  export namespace Components {
9
11
  interface AppModal {
10
12
  "isOpen": boolean;
11
13
  "modalTitle": string;
12
14
  }
13
15
  interface CrmBonus {
16
+ "storeName": any;
14
17
  "userId": string;
15
18
  }
16
19
  interface CrmBonusForm {
20
+ "storeName": any;
21
+ }
22
+ interface GiftbackPin {
23
+ "sent": IPinSent;
24
+ }
25
+ interface GiftbackProgress {
26
+ "maxValue": number;
27
+ "totalGiftback": number;
28
+ "validityDate": string;
29
+ }
30
+ interface PhoneInput {
31
+ "loading": boolean;
32
+ "sendPin": Function;
17
33
  }
18
34
  interface PhoneInputMask {
19
- "getPhone": () => string;
35
+ "getPhone": () => Promise<string>;
20
36
  }
21
37
  }
22
38
  export interface AppModalCustomEvent<T> extends CustomEvent<T> {
@@ -53,6 +69,24 @@ declare global {
53
69
  prototype: HTMLCrmBonusFormElement;
54
70
  new (): HTMLCrmBonusFormElement;
55
71
  };
72
+ interface HTMLGiftbackPinElement extends Components.GiftbackPin, HTMLStencilElement {
73
+ }
74
+ var HTMLGiftbackPinElement: {
75
+ prototype: HTMLGiftbackPinElement;
76
+ new (): HTMLGiftbackPinElement;
77
+ };
78
+ interface HTMLGiftbackProgressElement extends Components.GiftbackProgress, HTMLStencilElement {
79
+ }
80
+ var HTMLGiftbackProgressElement: {
81
+ prototype: HTMLGiftbackProgressElement;
82
+ new (): HTMLGiftbackProgressElement;
83
+ };
84
+ interface HTMLPhoneInputElement extends Components.PhoneInput, HTMLStencilElement {
85
+ }
86
+ var HTMLPhoneInputElement: {
87
+ prototype: HTMLPhoneInputElement;
88
+ new (): HTMLPhoneInputElement;
89
+ };
56
90
  interface HTMLPhoneInputMaskElement extends Components.PhoneInputMask, HTMLStencilElement {
57
91
  }
58
92
  var HTMLPhoneInputMaskElement: {
@@ -63,6 +97,9 @@ declare global {
63
97
  "app-modal": HTMLAppModalElement;
64
98
  "crm-bonus": HTMLCrmBonusElement;
65
99
  "crm-bonus-form": HTMLCrmBonusFormElement;
100
+ "giftback-pin": HTMLGiftbackPinElement;
101
+ "giftback-progress": HTMLGiftbackProgressElement;
102
+ "phone-input": HTMLPhoneInputElement;
66
103
  "phone-input-mask": HTMLPhoneInputMaskElement;
67
104
  }
68
105
  }
@@ -73,9 +110,23 @@ declare namespace LocalJSX {
73
110
  "onModalClosed"?: (event: AppModalCustomEvent<void>) => void;
74
111
  }
75
112
  interface CrmBonus {
113
+ "storeName"?: any;
76
114
  "userId"?: string;
77
115
  }
78
116
  interface CrmBonusForm {
117
+ "storeName"?: any;
118
+ }
119
+ interface GiftbackPin {
120
+ "sent"?: IPinSent;
121
+ }
122
+ interface GiftbackProgress {
123
+ "maxValue"?: number;
124
+ "totalGiftback"?: number;
125
+ "validityDate"?: string;
126
+ }
127
+ interface PhoneInput {
128
+ "loading"?: boolean;
129
+ "sendPin"?: Function;
79
130
  }
80
131
  interface PhoneInputMask {
81
132
  }
@@ -83,6 +134,9 @@ declare namespace LocalJSX {
83
134
  "app-modal": AppModal;
84
135
  "crm-bonus": CrmBonus;
85
136
  "crm-bonus-form": CrmBonusForm;
137
+ "giftback-pin": GiftbackPin;
138
+ "giftback-progress": GiftbackProgress;
139
+ "phone-input": PhoneInput;
86
140
  "phone-input-mask": PhoneInputMask;
87
141
  }
88
142
  }
@@ -93,6 +147,9 @@ declare module "@stencil/core" {
93
147
  "app-modal": LocalJSX.AppModal & JSXBase.HTMLAttributes<HTMLAppModalElement>;
94
148
  "crm-bonus": LocalJSX.CrmBonus & JSXBase.HTMLAttributes<HTMLCrmBonusElement>;
95
149
  "crm-bonus-form": LocalJSX.CrmBonusForm & JSXBase.HTMLAttributes<HTMLCrmBonusFormElement>;
150
+ "giftback-pin": LocalJSX.GiftbackPin & JSXBase.HTMLAttributes<HTMLGiftbackPinElement>;
151
+ "giftback-progress": LocalJSX.GiftbackProgress & JSXBase.HTMLAttributes<HTMLGiftbackProgressElement>;
152
+ "phone-input": LocalJSX.PhoneInput & JSXBase.HTMLAttributes<HTMLPhoneInputElement>;
96
153
  "phone-input-mask": LocalJSX.PhoneInputMask & JSXBase.HTMLAttributes<HTMLPhoneInputMaskElement>;
97
154
  }
98
155
  }
@@ -0,0 +1,4 @@
1
+ export interface IPinSent {
2
+ storeId: number;
3
+ userId: number;
4
+ }
@@ -0,0 +1,13 @@
1
+ export interface IProduct {
2
+ variantId: string;
3
+ sku: string;
4
+ amount: number;
5
+ }
6
+ export interface IValidatePinBonus {
7
+ storeId: number;
8
+ userId: number;
9
+ cartId: string;
10
+ products: Array<IProduct>;
11
+ phone: number;
12
+ pin: number;
13
+ }
@@ -0,0 +1,4 @@
1
+ export declare const CRM_BONUS_API_URL = "http://localhost:3500";
2
+ export declare const CRM_BONUS_ID_LOJA = "undefined";
3
+ export declare const CRM_BONUS_CODEMPRESA = "undefined";
4
+ export declare const CRM_BONUS_AUTHORIZATION = "undefined";
@@ -0,0 +1,6 @@
1
+ import { IPinSent } from '../dto/pin.sent';
2
+ export declare class CrmBonusService {
3
+ private axiosInstance;
4
+ constructor();
5
+ sendPin(phone: number, store: string): Promise<IPinSent>;
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crmbonus-component-wake",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -46,5 +46,8 @@
46
46
  "jest-cli": "^29.7.0",
47
47
  "puppeteer": "^21.9.0"
48
48
  },
49
- "license": "MIT"
49
+ "license": "MIT",
50
+ "dependencies": {
51
+ "axios": "^1.7.7"
52
+ }
50
53
  }