Skip to content

Commit

Permalink
Update auth, order and account to 1.0.2 (beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferri0 committed Jan 17, 2025
1 parent 6cb89d4 commit 0a4087c
Show file tree
Hide file tree
Showing 55 changed files with 283 additions and 111 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
"dependencies": {
"@adobe/magento-storefront-event-collector": "^1.8.0",
"@adobe/magento-storefront-events-sdk": "^1.8.0",
"@dropins/storefront-account": "~1.0.0",
"@dropins/storefront-auth": "~1.0.0",
"@dropins/storefront-account": "~1.0.2-beta1",
"@dropins/storefront-auth": "~1.0.2-beta1",
"@dropins/storefront-cart": "~1.0.2",
"@dropins/storefront-checkout": "~1.0.0",
"@dropins/storefront-order": "~1.0.0",
"@dropins/storefront-order": "~1.0.2-beta2",
"@dropins/storefront-pdp": "~1.0.0",
"@dropins/tools": "^0.39.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
* is strictly forbidden unless prior written permission is obtained
* from Adobe.
*******************************************************************/
export declare const GET_STORE_CONFIG = "\n query GET_STORE_CONFIG {\n storeConfig {\n base_media_url\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n }\n }\n";
export declare const GET_STORE_CONFIG = "\n query GET_STORE_CONFIG {\n storeConfig {\n base_media_url\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n store_code\n }\n }\n";
//# sourceMappingURL=getStoreConfig.graphql.d.ts.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*! Copyright 2025 Adobe
All Rights Reserved. */
import{Initializer as f}from"@dropins/tools/lib.js";import{f as h,l as _,k as g}from"./removeCustomerAddress.js";const c=new f({init:async t=>{const r={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};c.config.setConfig({...r,...t})},listeners:()=>[]}),C=c.config,l=t=>{var r,a,i,e,o,n;return{baseMediaUrl:(a=(r=t==null?void 0:t.data)==null?void 0:r.storeConfig)==null?void 0:a.base_media_url,minLength:+((e=(i=t==null?void 0:t.data)==null?void 0:i.storeConfig)==null?void 0:e.minimum_password_length)||3,requiredCharacterClasses:+((n=(o=t==null?void 0:t.data)==null?void 0:o.storeConfig)==null?void 0:n.required_character_classes_number)||0}},m=`
import{Initializer as d}from"@dropins/tools/lib.js";import{f as h,l as g,k as l}from"./removeCustomerAddress.js";const _=new d({init:async t=>{const a={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};_.config.setConfig({...a,...t})},listeners:()=>[]}),G=_.config,m=t=>{var a,r,i,o,e,c,n,f;return{baseMediaUrl:(r=(a=t==null?void 0:t.data)==null?void 0:a.storeConfig)==null?void 0:r.base_media_url,minLength:+((o=(i=t==null?void 0:t.data)==null?void 0:i.storeConfig)==null?void 0:o.minimum_password_length)||3,requiredCharacterClasses:+((c=(e=t==null?void 0:t.data)==null?void 0:e.storeConfig)==null?void 0:c.required_character_classes_number)||0,storeCode:((f=(n=t==null?void 0:t.data)==null?void 0:n.storeConfig)==null?void 0:f.store_code)??""}},u=`
query GET_STORE_CONFIG {
storeConfig {
base_media_url
autocomplete_on_storefront
minimum_password_length
required_character_classes_number
store_code
}
}
`,s=async()=>await h(m,{method:"GET",cache:"force-cache"}).then(t=>{var r;return(r=t.errors)!=null&&r.length?_(t.errors):l(t)}).catch(g);export{C as c,s as g,c as i};
`,b=async()=>await h(u,{method:"GET",cache:"force-cache"}).then(t=>{var a;return(a=t.errors)!=null&&a.length?g(t.errors):m(t)}).catch(l);export{G as c,b as g,_ as i};

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions scripts/__dropins__/storefront-account/data/models/customer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,15 @@ export interface CustomerDataModelShort {
createdAt: string;
[key: string]: string | boolean | number;
}
export interface AccountModel {
firstName?: string;
lastName?: string;
emailAddress?: string;
phoneNumber?: string;
countryCode?: string;
accountId?: string;
accountType?: string;
company?: string;
customerGroup?: string;
}
//# sourceMappingURL=customer.d.ts.map
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export interface StoreConfigModel {
baseMediaUrl: string;
minLength: number;
requiredCharacterClasses: number;
storeCode: string;
}
//# sourceMappingURL=store-config.d.ts.map
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ export * from './transform-countries';
export * from './transform-regions';
export * from './transform-order-history-list';
export * from './transform-store-config';
export * from './transform-account';
//# sourceMappingURL=index.d.ts.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { AccountModel, CustomerDataModelShort } from '../models/customer';

/**
* Reference:
* https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-collector/src/handlers/account/editAccountAEP.ts
*/
export declare const transformAccount: (data: CustomerDataModelShort) => AccountModel;
//# sourceMappingURL=transform-account.d.ts.map
28 changes: 28 additions & 0 deletions scripts/__dropins__/storefront-account/lib/acdl.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/********************************************************************
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2024 Adobe
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe and its suppliers, if any. The intellectual
* and technical concepts contained herein are proprietary to Adobe
* and its suppliers and are protected by all applicable intellectual
* property laws, including trade secret and copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe.
*******************************************************************/
declare enum EventsList {
EDIT_ACCOUNT_EVENT = "edit-account"
}
export declare function getAdobeDataLayer(): any;
/**
* Pushes an event to the Adobe Client Data Layer (ACDL)
* Logic based on: https://github.com/adobe/commerce-events/blob/1973d0ce28471ef190fa06dad6359ffa0ab51db6/packages/storefront-events-sdk/src/Base.ts#L34
*/
declare function pushEvent(event: string, additionalContext?: any): void;
declare const publishEvents: (eventType: string, eventParams: any) => null | undefined;
export { EventsList, publishEvents, pushEvent };
//# sourceMappingURL=acdl.d.ts.map
2 changes: 1 addition & 1 deletion scripts/__dropins__/storefront-account/render.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface StoreConfigProps {
base_media_url: string;
minimum_password_length: number;
required_character_classes_number: string;
store_code: string;
}
export interface GetStoreConfigResponse {
data: {
Expand Down
3 changes: 3 additions & 0 deletions scripts/__dropins__/storefront-auth/chunks/Button.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0a4087c

Please sign in to comment.