@nizza/core 0.6.2-beta.1 → 0.6.3-beta.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.
Files changed (89) hide show
  1. package/dist/index.cjs +51 -51
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +5033 -8719
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/lib/accounts/atoms/account.d.ts +0 -1
  6. package/dist/lib/accounts/core/domain/Account.d.ts +4 -5
  7. package/dist/lib/accounts/core/domain/Account.d.ts.map +1 -1
  8. package/dist/lib/accounts/core/domain/AccountRepository.d.ts +0 -1
  9. package/dist/lib/accounts/core/domain/shared/constants.d.ts.map +1 -1
  10. package/dist/lib/accounts/core/domain/types.d.ts +0 -1
  11. package/dist/lib/accounts/core/index.d.ts +0 -1
  12. package/dist/lib/accounts/core/infrastructure/EventRestRepository.d.ts +0 -1
  13. package/dist/lib/accounts/core/services/AccountService.d.ts +0 -1
  14. package/dist/lib/accounts/hooks/account.hook.d.ts +10 -0
  15. package/dist/lib/accounts/hooks/account.hook.d.ts.map +1 -0
  16. package/dist/lib/accounts/hooks/index.d.ts +1 -1
  17. package/dist/lib/accounts/hooks/index.d.ts.map +1 -1
  18. package/dist/lib/add-to-cart/hooks.d.ts +0 -1
  19. package/dist/lib/clean-architecture/infrastructure/clients/http-axios.client.d.ts +1 -2
  20. package/dist/lib/clean-architecture/utils/error-messages.d.ts +0 -1
  21. package/dist/lib/errors/DomainError.d.ts.map +1 -1
  22. package/dist/lib/errors/api.d.ts +0 -1
  23. package/dist/lib/errors/app.d.ts +0 -1
  24. package/dist/lib/event-buses/BroadcastChannelEventBus.d.ts +1 -2
  25. package/dist/lib/i18n/buildTranslations.d.ts +1 -2
  26. package/dist/lib/i18n/init.d.ts +0 -1
  27. package/dist/lib/i18n/nizza.d.ts +0 -1
  28. package/dist/lib/lit/react-host-element.d.ts +1 -2
  29. package/dist/lib/meta-data/core/domain/meta-data-client.entity.d.ts +2 -3
  30. package/dist/lib/meta-data/hooks/use-meta-data-client.hook.d.ts +0 -1
  31. package/dist/lib/mobx/StoreProvider.d.ts +1 -2
  32. package/dist/lib/mobx/hooks.d.ts +0 -1
  33. package/dist/lib/nizza-store/NizzaStore.d.ts +7 -5
  34. package/dist/lib/nizza-store/NizzaStore.d.ts.map +1 -1
  35. package/dist/lib/nizza-store/react-hooks.d.ts +0 -1
  36. package/dist/lib/runtime/component-manager.d.ts +1 -2
  37. package/dist/lib/runtime/implementations/external-runtime.d.ts +2 -3
  38. package/dist/lib/runtime/implementations/external-runtime.d.ts.map +1 -1
  39. package/dist/lib/runtime/implementations/index.d.ts +6 -6
  40. package/dist/lib/runtime/implementations/index.d.ts.map +1 -1
  41. package/dist/lib/runtime/implementations/local-runtime.d.ts +2 -3
  42. package/dist/lib/runtime/implementations/platform.d.ts +10 -0
  43. package/dist/lib/runtime/implementations/platform.d.ts.map +1 -0
  44. package/dist/lib/runtime/implementations/vtex-faststore-runtime.d.ts +1 -2
  45. package/dist/lib/runtime/implementations/vtex-io-runtime.d.ts +1 -2
  46. package/dist/lib/runtime/implementations/vtex-legacy-runtime.d.ts +1 -2
  47. package/dist/lib/runtime/runtime.d.ts +2 -3
  48. package/dist/lib/runtime/types.d.ts +2 -3
  49. package/dist/lib/runtime/utils.d.ts +0 -1
  50. package/dist/lib/socket/core/domain/entities/chat-client-socket.entity.d.ts +1 -2
  51. package/dist/lib/socket/core/domain/entities/event-chat-room.entity.d.ts +1 -2
  52. package/dist/lib/socket/core/domain/repositories/event-chat-room.repository.d.ts +1 -2
  53. package/dist/lib/socket/core/domain/shared/errors.d.ts +0 -1
  54. package/dist/lib/socket/core/index.d.ts +0 -1
  55. package/dist/lib/socket/core/infrastructure/graphql-event-chat-room.repository.d.ts +1 -2
  56. package/dist/lib/socket/core/services/event-chat-room.service.d.ts +0 -1
  57. package/dist/lib/socket/hooks/use-chat-socket-actions.hook.d.ts +0 -1
  58. package/dist/lib/socket/hooks/use-chat-socket-client.hook.d.ts +0 -1
  59. package/dist/lib/socket/hooks/use-connect-chat-socket.hook.d.ts +0 -1
  60. package/dist/lib/socket/state.d.ts +0 -1
  61. package/dist/lib/socket/utils/add-question-data.util.d.ts +0 -1
  62. package/dist/lib/socket/utils/normalize-chat-message.util.d.ts +0 -1
  63. package/dist/lib/types/add-to-cart-hooks.d.ts +0 -1
  64. package/dist/lib/types/api-graphql-types.d.ts +34 -103
  65. package/dist/lib/types/api-graphql-types.d.ts.map +1 -1
  66. package/dist/lib/types/appModule.d.ts +1 -2
  67. package/dist/lib/types/i18n.d.ts +0 -1
  68. package/dist/lib/types/mobx.d.ts +0 -1
  69. package/dist/lib/types/nizza/collection.entity.d.ts +0 -1
  70. package/dist/lib/types/nizza/globalStore.d.ts +4 -5
  71. package/dist/lib/types/nizza/main.d.ts +0 -1
  72. package/dist/lib/types/nizza/product.d.ts +0 -1
  73. package/dist/lib/types/nizza/productDataSource.d.ts +2 -3
  74. package/dist/lib/types/runtime/base.d.ts +2 -2
  75. package/dist/lib/types/runtime/base.d.ts.map +1 -1
  76. package/dist/lib/types/runtime/metadata.d.ts +0 -1
  77. package/dist/lib/types/utils.d.ts +0 -1
  78. package/dist/lib/utils/createLazyLogger.d.ts +1 -2
  79. package/dist/lib/utils/customFetch.d.ts +0 -1
  80. package/dist/lib/utils/customFetch.d.ts.map +1 -1
  81. package/dist/lib/utils/downloadFile.d.ts.map +1 -1
  82. package/dist/lib/utils/getClientTimeZone.d.ts +0 -1
  83. package/dist/lib/utils/helpers.d.ts.map +1 -1
  84. package/dist/lib/utils/logger.d.ts +0 -1
  85. package/package.json +1 -1
  86. package/dist/lib/accounts/hooks/useAccount.d.ts +0 -5
  87. package/dist/lib/accounts/hooks/useAccount.d.ts.map +0 -1
  88. package/dist/lib/jotai/globalAtomStore.d.ts +0 -40
  89. package/dist/lib/jotai/globalAtomStore.d.ts.map +0 -1
@@ -1,5 +1,4 @@
1
1
  import { NizzaAccount } from '../core';
2
-
3
2
  export declare const accountAtom: import('jotai').PrimitiveAtom<NizzaAccount | null> & {
4
3
  init: NizzaAccount | null;
5
4
  };
@@ -1,7 +1,6 @@
1
- import { AccountCurrencyConfig, AccountGlobalPage, AccountProps, AccountStripe, ExceededFeatures, RawAccount, VariationsConfig } from './types';
2
- import { AccountContractStatusTypes, AccountContractTypes, AccountPlanDescriptionTypes, AccountTypes } from './shared';
3
1
  import { IAggregateRoot } from '../../../clean-architecture';
4
-
2
+ import { AccountContractStatusTypes, AccountContractTypes, AccountPlanDescriptionTypes, AccountSubscriptionTypes, AccountTypes } from './shared';
3
+ import { AccountCurrencyConfig, AccountGlobalPage, AccountProps, AccountStripe, ExceededFeatures, RawAccount, VariationsConfig } from './types';
5
4
  export declare class NizzaAccount implements IAggregateRoot, AccountProps {
6
5
  readonly root: import('../../../clean-architecture').AggregateRoot<NizzaAccount, AccountProps>;
7
6
  id: string;
@@ -19,7 +18,7 @@ export declare class NizzaAccount implements IAggregateRoot, AccountProps {
19
18
  installationDateApp: string;
20
19
  cxAccount: string;
21
20
  freeService: boolean;
22
- subscriptionType: null;
21
+ subscriptionType: AccountSubscriptionTypes;
23
22
  minutesAvailable: number;
24
23
  globalPage: AccountGlobalPage;
25
24
  stripe: AccountStripe;
@@ -27,7 +26,7 @@ export declare class NizzaAccount implements IAggregateRoot, AccountProps {
27
26
  planType: string;
28
27
  selectFreeTrial: boolean;
29
28
  exceededFeatures?: ExceededFeatures;
30
- host: null;
29
+ host: string | null;
31
30
  variationThumbnailName?: string;
32
31
  variationsConfig?: VariationsConfig;
33
32
  constructor(props: AccountProps);
@@ -1 +1 @@
1
- {"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../../../../../src/lib/accounts/core/domain/Account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,2BAA2B,EAC3B,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAA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get(name: string): Promise<NizzaAccount | null>;
5
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/accounts/core/domain/shared/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,QAAQ,gBAAgB;IACxB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AACD,oBAAY,oBAAoB;IAC9B,QAAQ,oBAAoB;IAE5B;;OAEG;IACH,MAAM,wBAAwB;IAC9B,SAAS,cAAc;CACxB;AAED,oBAAY,0BAA0B;IACpC,MAAM,oBAAoB;IAC1B,QAAQ,sBAAsB;CAC/B;AAED,oBAAY,wBAAwB;IAClC,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,GAAG,QAAQ;CACZ;AAED,oBAAY,2BAA2B;IACrC,IAAI,cAAc;IAClB;;;;OAIG;IACH,QAAQ,kBAAkB;IAC1B,GAAG,aAAa;IAChB,IAAI,YAAY;CACjB;AAED,oBAAY,sBAAsB;IAChC,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;CAClB"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/accounts/core/domain/shared/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,QAAQ,gBAAgB;IACxB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,oBAAY,oBAAoB;IAC9B,QAAQ,oBAAoB;IAE5B;;OAEG;IACH,MAAM,wBAAwB;IAC9B,SAAS,cAAc;CACxB;AAED,oBAAY,0BAA0B;IACpC,MAAM,oBAAoB;IAC1B,QAAQ,sBAAsB;CAC/B;AAED,oBAAY,wBAAwB;IAClC,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,GAAG,QAAQ;CACZ;AAED,oBAAY,2BAA2B;IACrC,IAAI,cAAc;IAClB;;;;OAIG;IACH,QAAQ,kBAAkB;IAC1B,GAAG,aAAa;IAChB,IAAI,YAAY;CACjB;AAED,oBAAY,sBAAsB;IAChC,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;CAClB"}
@@ -1,5 +1,4 @@
1
1
  import { AccountContractStatusTypes, AccountContractTypes, AccountPlanDescriptionTypes, AccountSubscriptionTypes, AccountTypes, GlobalPageSectionTypes } from './shared';
2
-
3
2
  export interface BaseProps {
4
3
  id: string;
5
4
  account: string;
@@ -1,5 +1,4 @@
1
1
  import { AccountService } from './services';
2
-
3
2
  declare const accountService: AccountService;
4
3
  export * from './domain';
5
4
  export * from './infrastructure';
@@ -1,5 +1,4 @@
1
1
  import { AccountRepository, NizzaAccount } from '../domain';
2
-
3
2
  export declare class AccountRestRepository implements AccountRepository {
4
3
  get(name: string): Promise<NizzaAccount | null>;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { AccountRepository } from '../domain';
2
-
3
2
  export declare class AccountService {
4
3
  private accountRepository;
5
4
  constructor(accountRepository: AccountRepository);
@@ -0,0 +1,10 @@
1
+ export declare const useAccount: () => {
2
+ account: import('..').NizzaAccount | undefined;
3
+ accountName: string | undefined;
4
+ isLoading: boolean;
5
+ isError: boolean;
6
+ isSuccess: boolean;
7
+ accountStatus: import('../..').AccountStatus;
8
+ refetchAccount: () => Promise<void>;
9
+ };
10
+ //# sourceMappingURL=account.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.hook.d.ts","sourceRoot":"","sources":["../../../../src/lib/accounts/hooks/account.hook.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;CAkBtB,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './useAccount';
1
+ export * from './account.hook';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/accounts/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/accounts/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { AddToCartActionFactory, HooksInitConfig, HookState } from '../types';
2
-
3
2
  export declare const addToCartMessages: {
4
3
  errorAddingToCart: string;
5
4
  errorOpeningVariationSelector: string;
@@ -1,6 +1,5 @@
1
- import { HttpClient, PostRequestInput } from '../../domain';
2
1
  import { Logger } from 'loglevel';
3
-
2
+ import { HttpClient, PostRequestInput } from '../../domain';
4
3
  type Config = {
5
4
  baseUrl: string;
6
5
  logger: Logger;
@@ -1,4 +1,3 @@
1
1
  import { ErrorCodes } from '../domain';
2
-
3
2
  export declare const getUserFriendlyMessage: (errorCode?: ErrorCodes) => string;
4
3
  //# sourceMappingURL=error-messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DomainError.d.ts","sourceRoot":"","sources":["../../../src/lib/errors/DomainError.ts"],"names":[],"mappings":"AAAA,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,qBAAa,WAAY,SAAQ,KAAK;IACc,KAAK,CAAC;gBAA5C,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAS,KAAK,CAAC,KAAK;IAK7D,KAAK,IAAI,cAAc;CAOxB"}
1
+ {"version":3,"file":"DomainError.d.ts","sourceRoot":"","sources":["../../../src/lib/errors/DomainError.ts"],"names":[],"mappings":"AAAA,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,qBAAa,WAAY,SAAQ,KAAK;IACc,KAAK,CAAC,EAAE,GAAG;gBAAjD,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAS,KAAK,CAAC,EAAE,GAAG;IAK7D,KAAK,IAAI,cAAc;CAOxB"}
@@ -1,5 +1,4 @@
1
1
  import { DomainError } from './DomainError';
2
-
3
2
  export declare class ResourceNotFoundError extends DomainError {
4
3
  constructor(id: string);
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { DomainError } from './DomainError';
2
-
3
2
  export declare class UnexpectedError extends DomainError {
4
3
  constructor(error: Error | unknown);
5
4
  }
@@ -1,6 +1,5 @@
1
- import { Attributes, EventBus, EventBusListener, EventBusSubscription } from '../types';
2
1
  import { Logger as LogLevelLogger } from 'loglevel';
3
-
2
+ import { Attributes, EventBus, EventBusListener, EventBusSubscription } from '../types';
4
3
  /**
5
4
  * Implementation of EventBus using BroadcastChannel for cross-window communication.
6
5
  */
@@ -1,6 +1,5 @@
1
- import { TranslationFiles, Translations } from '../types';
2
1
  import { i18n } from 'i18next';
3
-
2
+ import { TranslationFiles, Translations } from '../types';
4
3
  export declare function buildLanguageTranslations(langTranslations: Record<string, Record<string, string>>): Record<string, string>;
5
4
  export declare function buildTranslations(translationFiles: TranslationFiles): Translations;
6
5
  export declare function registerTranslationsOf(i18Instance: i18n, translationFiles: TranslationFiles): void;
@@ -1,4 +1,3 @@
1
1
  import { ThirdPartyModule, i18n } from 'i18next';
2
-
3
2
  export declare function i18Init(i18Instance: i18n, initReactI18next: ThirdPartyModule): void;
4
3
  //# sourceMappingURL=init.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { TranslationFiles } from '../types';
2
-
3
2
  export declare const registerTranslations: (translationFiles: TranslationFiles) => void;
4
3
  //# sourceMappingURL=nizza.d.ts.map
@@ -1,6 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { LitElement } from 'lit';
3
-
2
+ import { default as React } from 'react';
4
3
  type Styles = Record<string, unknown>;
5
4
  /**
6
5
  * Abstract base class for LitElement components that host a React component.
@@ -1,7 +1,6 @@
1
- import { RealTimeStreamInfo } from './real-time-stream-info.entity';
2
- import { AddToCart } from '../../../types';
3
1
  import { Dispatch, SetStateAction } from 'react';
4
-
2
+ import { AddToCart } from '../../../types';
3
+ import { RealTimeStreamInfo } from './real-time-stream-info.entity';
5
4
  export type MetaDataClient = {
6
5
  realTimeStreamInfo: RealTimeStreamInfo;
7
6
  productsInCart: AddToCart[];
@@ -1,4 +1,3 @@
1
1
  import { MetaDataClient } from '../core';
2
-
3
2
  export declare const useMetaDataClient: () => MetaDataClient;
4
3
  //# sourceMappingURL=use-meta-data-client.hook.d.ts.map
@@ -1,6 +1,5 @@
1
- import { AppModuleStoreList, StoreClass } from '../types';
2
1
  import { FC, ReactNode } from 'react';
3
-
2
+ import { AppModuleStoreList, StoreClass } from '../types';
4
3
  interface Props {
5
4
  stores: AppModuleStoreList;
6
5
  children?: ReactNode;
@@ -1,5 +1,4 @@
1
1
  import { DependencyList, EffectCallback } from 'react';
2
-
3
2
  /**
4
3
  * This hook is just like the standard MobX autorun function, but it hooks into the React component
5
4
  * lifecycle. This means the set up for the autorun only happens once, and it's automatically
@@ -1,10 +1,9 @@
1
- import { Logger } from '../utils/logger';
2
- import { AccountStatus, AddToCartConfig, INizzaStore, NizzaConfig, NizzaProductDataSource } from '../types';
3
- import { BroadcastChannelEventBus } from '../event-buses';
4
1
  import { NizzaAccount } from '../accounts';
5
-
2
+ import { BroadcastChannelEventBus } from '../event-buses';
3
+ import { AccountStatus, AddToCartConfig, INizzaStore, NizzaConfig, NizzaProductDataSource } from '../types';
4
+ import { Logger } from '../utils/logger';
6
5
  export declare class NizzaStore implements INizzaStore {
7
- static readonly version = "5";
6
+ static readonly version = "6";
8
7
  private static _instance;
9
8
  readonly instanceId: string;
10
9
  readonly log: Logger;
@@ -17,12 +16,15 @@ export declare class NizzaStore implements INizzaStore {
17
16
  private constructor();
18
17
  static instance(): NizzaStore;
19
18
  configure(config: NizzaConfig): Promise<void>;
19
+ private updateConfig;
20
+ private fetchAccount;
20
21
  private setAccount;
21
22
  private setAccountStatus;
22
23
  setProductDataSource(dataSource: NizzaProductDataSource): void;
23
24
  setProductId(id: string): void;
24
25
  setOrderFormId(id: string): void;
25
26
  setAddToCartConfig(config: AddToCartConfig): void;
27
+ refetchAccount(): Promise<void>;
26
28
  get version(): string;
27
29
  get config(): NizzaConfig | null;
28
30
  get account(): NizzaAccount | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"NizzaStore.d.ts","sourceRoot":"","sources":["../../../src/lib/nizza-store/NizzaStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EACL,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACX,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,UAAW,YAAW,WAAW;IAC5C,MAAM,CAAC,QAAQ,CAAC,OAAO,OAAO;IAC9B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAa;IAErC,QAAQ,CAAC,UAAU,SAAa;IAChC,QAAQ,CAAC,GAAG,SAAoB;IAChC,QAAQ,CAAC,UAAU,4BAAiC;IAEpD,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,OAAO,CAAC,cAAc,CAAyB;IAC/C,OAAO,CAAC,kBAAkB,CAAqC;IAC/D,OAAO,CAAC,SAAS,CAA0D;IAE3E,OAAO;IAsBP,MAAM,CAAC,QAAQ,IAAI,UAAU;IAqBvB,SAAS,CAAC,MAAM,EAAE,WAAW;IAuBnC,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,gBAAgB;IAGxB,oBAAoB,CAAC,UAAU,EAAE,sBAAsB;IAIvD,YAAY,CAAC,EAAE,EAAE,MAAM;IAKvB,cAAc,CAAC,EAAE,EAAE,MAAM;IAKzB,kBAAkB,CAAC,MAAM,EAAE,eAAe;IAS1C,IAAI,O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AC,EAAE,EAAE,MAAM;IAKzB,kBAAkB,CAAC,MAAM,EAAE,eAAe;IASpC,cAAc;IAKpB,IAAI,OAAO,WAEV;IAED,IAAI,MAAM,uBAET;IAED,IAAI,OAAO,6BAEV;IAED,IAAI,aAAa,kBAEhB;IAED,IAAI,WAAW,uBAEd;IAED,IAAI,iBAAiB,uCAEpB;IAED,IAAI,QAAQ,6BAEX;CACF;AAED,eAAO,MAAM,QAAQ,YAAa,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,eAS5D,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { NizzaStore } from './NizzaStore';
2
-
3
2
  /**
4
3
  * Returns the NizzaStore using memoization.
5
4
  *
@@ -1,6 +1,5 @@
1
- import { RenderHandler, RenderProps } from '../types';
2
1
  import { Logger } from 'loglevel';
3
-
2
+ import { RenderHandler, RenderProps } from '../types';
4
3
  export declare class ComponentManager<T = any> {
5
4
  private renderFn;
6
5
  private logger;
@@ -1,7 +1,6 @@
1
- import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
- import { Runtime } from '../runtime';
3
1
  import { GlobalStore, RuntimeType } from '../../types';
4
-
2
+ import { Runtime } from '../runtime';
3
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
5
4
  export declare class ExternalRuntime implements RuntimeStrategy {
6
5
  private config;
7
6
  static type: RuntimeType;
@@ -1 +1 @@
1
- {"version":3,"file":"external-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/external-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAMlE,qBAAa,eAAgB,YAAW,eAAe;IAGzC,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAwB;gBAEf,MAAM,EAAE,qBAAqB;IAEjD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO;IASrD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
1
+ {"version":3,"file":"external-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/external-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAOlE,qBAAa,eAAgB,YAAW,eAAe;IAGzC,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAwB;gBAEf,MAAM,EAAE,qBAAqB;IAEjD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO;IAUrD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
@@ -1,12 +1,12 @@
1
- import { VtexFastStoreRuntime } from './vtex-faststore-runtime';
2
- import { VtexLegacyRuntime } from './vtex-legacy-runtime';
3
- import { VtexIORuntime } from './vtex-io-runtime';
4
- import { LocalRuntime } from './local-runtime';
5
1
  import { ExternalRuntime } from './external-runtime';
6
-
2
+ import { LocalRuntime } from './local-runtime';
3
+ import { VtexIORuntime } from './vtex-io-runtime';
4
+ import { VtexLegacyRuntime } from './vtex-legacy-runtime';
5
+ import { VtexFastStoreRuntime } from './vtex-faststore-runtime';
6
+ import { PlatformRuntime } from './platform';
7
7
  export * from './external-runtime';
8
8
  export * from './local-runtime';
9
9
  export * from './vtex-io-runtime';
10
10
  export * from './vtex-legacy-runtime';
11
- export declare const runtimeList: (typeof LocalRuntime | typeof VtexLegacyRuntime | typeof VtexIORuntime | typeof ExternalRuntime | typeof VtexFastStoreRuntime)[];
11
+ export declare const runtimeList: (typeof LocalRuntime | typeof VtexLegacyRuntime | typeof VtexIORuntime | typeof ExternalRuntime | typeof VtexFastStoreRuntime | typeof PlatformRuntime)[];
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AAEtC,eAAO,MAAM,WAAW,kIAMvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AAEtC,eAAO,MAAM,WAAW,2JAOvB,CAAC"}
@@ -1,7 +1,6 @@
1
- import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
- import { Runtime } from '../runtime';
3
1
  import { GlobalStore, RuntimeType } from '../../types';
4
-
2
+ import { Runtime } from '../runtime';
3
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
5
4
  export declare class LocalRuntime implements RuntimeStrategy {
6
5
  private config;
7
6
  static type: RuntimeType;
@@ -0,0 +1,10 @@
1
+ import { RuntimeType } from '../../types';
2
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
3
+ export declare class PlatformRuntime implements RuntimeStrategy {
4
+ private config;
5
+ static type: RuntimeType;
6
+ constructor(config: RuntimeStrategyConfig);
7
+ static isApplicable(): boolean;
8
+ execute(): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIlE,qBAAa,eAAgB,YAAW,eAAe;IAGzC,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAwB;gBAEf,MAAM,EAAE,qBAAqB;IAEjD,MAAM,CAAC,YAAY,IAAI,OAAO;IAIxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
@@ -1,6 +1,5 @@
1
- import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
1
  import { RuntimeType } from '../../types';
3
-
2
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
4
3
  export declare class VtexFastStoreRuntime implements RuntimeStrategy {
5
4
  private config;
6
5
  static type: RuntimeType;
@@ -1,6 +1,5 @@
1
- import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
1
  import { RuntimeType } from '../../types';
3
-
2
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
4
3
  export declare class VtexIORuntime implements RuntimeStrategy {
5
4
  private config;
6
5
  static type: RuntimeType;
@@ -1,6 +1,5 @@
1
- import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
1
  import { RuntimeType } from '../../types';
3
-
2
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
4
3
  export declare class VtexLegacyRuntime implements RuntimeStrategy {
5
4
  private config;
6
5
  static type: RuntimeType;
@@ -1,7 +1,6 @@
1
- import { RuntimeConfigCallback, RuntimeConfigOptions } from './types';
2
- import { GlobalStore, GlobalStoreConfig, ModuleId, RenderHandler, RuntimeBundler, RuntimeManagerConfig, RuntimeMetadata, RuntimeType } from '../types';
3
1
  import { Logger as LogLevelLogger } from 'loglevel';
4
-
2
+ import { GlobalStore, GlobalStoreConfig, ModuleId, RenderHandler, RuntimeBundler, RuntimeManagerConfig, RuntimeMetadata, RuntimeType } from '../types';
3
+ import { RuntimeConfigCallback, RuntimeConfigOptions } from './types';
5
4
  export declare class Runtime<T extends GlobalStore> {
6
5
  private globalId;
7
6
  private metadata;
@@ -1,7 +1,6 @@
1
- import { Runtime } from './runtime';
2
- import { ComponentManager } from './component-manager';
3
1
  import { GlobalStore, RenderProps, RuntimeType } from '../types';
4
-
2
+ import { ComponentManager } from './component-manager';
3
+ import { Runtime } from './runtime';
5
4
  export interface RuntimeStrategy {
6
5
  execute(): Promise<void>;
7
6
  }
@@ -1,4 +1,3 @@
1
1
  import { RuntimeStrategyConstructor } from './types';
2
-
3
2
  export declare function validRuntime<T extends RuntimeStrategyConstructor>(ctor: T): T;
4
3
  //# sourceMappingURL=utils.d.ts.map
@@ -1,6 +1,5 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
1
  import { AddToCart, ChatMessage, HighlightProduct } from '../../../../types';
3
-
2
+ import { Dispatch, SetStateAction } from 'react';
4
3
  export interface ChatClientSocket {
5
4
  socket: WebSocket | undefined;
6
5
  chat: ChatMessage[];
@@ -1,6 +1,5 @@
1
- import { EventChatRoomProps, RawEventChatRoom } from '../shared';
2
1
  import { IAggregateRoot } from '../../../../clean-architecture';
3
-
2
+ import { EventChatRoomProps, RawEventChatRoom } from '../shared';
4
3
  export declare class EventChatRoom implements IAggregateRoot, EventChatRoomProps {
5
4
  readonly root: import('../../../../clean-architecture').AggregateRoot<EventChatRoom, EventChatRoomProps>;
6
5
  token: string;
@@ -1,6 +1,5 @@
1
- import { GetChatRoomInput } from '../shared';
2
1
  import { EventChatRoom } from '../entities';
3
-
2
+ import { GetChatRoomInput } from '../shared';
4
3
  export interface EventChatRoomRepository {
5
4
  getChatRoom(input: GetChatRoomInput): Promise<EventChatRoom>;
6
5
  }
@@ -1,5 +1,4 @@
1
1
  import { DomainError } from '../../../../errors';
2
-
3
2
  export declare class EventChatRoomTokenError extends DomainError {
4
3
  constructor();
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { EventChatRoomService } from './services';
2
-
3
2
  export * from './domain';
4
3
  export * from './infrastructure';
5
4
  export * from './services';
@@ -1,6 +1,5 @@
1
- import { EventChatRoom } from '../domain/entities';
2
1
  import { EventChatRoomRepository, GetChatRoomInput } from '../domain';
3
-
2
+ import { EventChatRoom } from '../domain/entities';
4
3
  export declare class GraphqlEventChatRoomRepository implements EventChatRoomRepository {
5
4
  private client;
6
5
  constructor();
@@ -1,5 +1,4 @@
1
1
  import { EventChatRoomRepository, GetChatRoomInput } from '../domain';
2
-
3
2
  export declare class EventChatRoomService {
4
3
  private eventChatRoomRepository;
5
4
  private account;
@@ -1,5 +1,4 @@
1
1
  import { ChatMessageBase } from '../../types';
2
-
3
2
  /**
4
3
  * Write operations that can be performed with the event chat room.
5
4
  */
@@ -1,5 +1,4 @@
1
1
  import { ChatClientSocket } from '../core';
2
-
3
2
  declare interface Props {
4
3
  eventId: string;
5
4
  userName: string;
@@ -1,5 +1,4 @@
1
1
  import { ChatMessage } from '../../types';
2
-
3
2
  interface Props {
4
3
  eventId: string;
5
4
  userName: string;
@@ -1,5 +1,4 @@
1
1
  import { ChatMessage } from '../types/nizza/chat';
2
-
3
2
  export declare const chatSocketAtom: import('jotai').PrimitiveAtom<WebSocket | undefined> & {
4
3
  init: WebSocket | undefined;
5
4
  };
@@ -1,4 +1,3 @@
1
1
  import { ChatMessage } from '../../types';
2
-
3
2
  export declare const addQuestionData: (msg: ChatMessage) => ChatMessage;
4
3
  //# sourceMappingURL=add-question-data.util.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { ChatMessage } from '../../types';
2
-
3
2
  export declare const normalizeChatMessage: (chat: ChatMessage[], data: any) => ChatMessage;
4
3
  //# sourceMappingURL=normalize-chat-message.util.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { NizzaProduct } from './nizza';
2
-
3
2
  export type HookName = 'transform' | 'validate' | 'end';
4
3
  /**
5
4
  * ============ Action types ============