@adobe-commerce/aio-toolkit 1.0.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,205 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-09-14
9
+
10
+ ### ๐ŸŽ‰ Initial Release
11
+
12
+ This is the first stable release of the **@adobe-commerce/aio-toolkit** - a comprehensive backend toolkit for Adobe App Builder applications. This release provides standardized tools and utilities for backend functionality across all major Adobe App Builder development scenarios.
13
+
14
+ #### ๐Ÿ› ๏ธ Repository & Documentation Setup
15
+ - **GitHub Configuration** `[Added]` - Complete professional repository setup
16
+ - Issue templates for bug reports, feature requests, and questions
17
+ - Pull request template streamlined for project workflow
18
+ - Code of Conduct tailored for internal team collaboration
19
+ - Contributing guidelines with development workflow and release process
20
+ - Security policy with vulnerability reporting procedures
21
+ - Proper attribution to "Adobe Consulting Services, Commerce Team"
22
+ - **Documentation Structure** `[Improved]` - Clean separation of concerns
23
+ - README.md focused on end-user installation and usage
24
+ - CONTRIBUTING.md for comprehensive development workflow
25
+ - Release process documentation moved to appropriate location
26
+ - Removed duplicate content and improved navigation
27
+
28
+ #### ๐Ÿ—๏ธ Commerce Components
29
+ - **[AdobeAuth](./docs/adobe-auth.md)** `[Added]` - Adobe IMS authentication and token management
30
+ - Static token retrieval with configurable IMS context
31
+ - Support for custom scopes and client credentials
32
+ - Comprehensive error handling for authentication failures
33
+ - TypeScript interfaces for IMS configuration
34
+
35
+ - **[AdobeCommerceClient](./docs/adobe-commerce-client.md)** `[Added]` - HTTP client for Adobe Commerce API integration
36
+ - Multiple authentication strategies (Basic Auth, OAuth 1.0a, IMS Bearer Token)
37
+ - Built-in request/response logging and error handling
38
+ - Configurable HTTP client with Got.js integration
39
+ - Support for all HTTP methods (GET, POST, PUT, DELETE)
40
+ - Connection pattern for extensible authentication
41
+
42
+ #### ๐Ÿ”ง Framework Components
43
+ - **[EventConsumerAction](./docs/event-consumer-action.md)** `[Added]` - Event-driven processing for Adobe I/O Events
44
+ - Automatic event validation and processing
45
+ - Configurable retry mechanisms and error handling
46
+ - Support for custom event handlers and middleware
47
+ - Built-in logging and monitoring capabilities
48
+
49
+ - **[FileRepository](./docs/file-repository.md)** `[Added]` - File-based storage with CRUD operations
50
+ - Complete CRUD operations for JSON file management
51
+ - Integration with Adobe I/O Runtime file system
52
+ - Automatic timestamp-based ID generation
53
+ - Error handling with graceful degradation
54
+ - TypeScript interfaces for file records
55
+
56
+ - **[GraphQlAction](./docs/graphql-action.md)** `[Added]` - GraphQL server implementation
57
+ - Schema validation and type safety
58
+ - Custom resolver support with context injection
59
+ - Error handling and response formatting
60
+ - Integration with Adobe I/O Runtime
61
+
62
+ - **[OpenWhisk](./docs/openwhisk.md)** `[Added]` - OpenWhisk client for serverless action invocation
63
+ - Direct OpenWhisk action invocation
64
+ - Parameter passing and response handling
65
+ - Error management and timeout handling
66
+ - TypeScript support for action parameters
67
+
68
+ - **[OpenWhiskAction](./docs/openwhisk-action.md)** `[Added]` - OpenWhisk action wrapper
69
+ - Standardized action structure with logging
70
+ - Request parameter validation
71
+ - Error handling with proper HTTP status codes
72
+ - Extensible base class for custom actions
73
+
74
+ - **[RuntimeAction](./docs/runtime-action.md)** `[Added]` - HTTP request handling and business logic execution
75
+ - Complete HTTP request/response handling
76
+ - Parameter validation and error management
77
+ - Built-in logging and debugging support
78
+ - Success and error response utilities
79
+ - TypeScript interfaces for all HTTP methods and status codes
80
+
81
+ #### ๐Ÿ”— Integration Components
82
+ - **[BearerToken](./docs/bearer-token.md)** `[Added]` - Bearer token extraction utility for OpenWhisk actions
83
+ - Extract and validate Bearer tokens from OpenWhisk headers
84
+ - JWT token parsing with expiration validation
85
+ - Support for custom token formats
86
+ - Token information extraction with expiry details
87
+
88
+ - **[InfiniteLoopBreaker](./docs/infinite-loop-breaker.md)** `[Added]` - Detect and prevent infinite loops in event-driven applications
89
+ - SHA256-based fingerprinting for event deduplication
90
+ - Configurable TTL for stored fingerprints
91
+ - State-based persistence using Adobe I/O State
92
+ - Support for custom key and fingerprint functions
93
+ - Comprehensive error handling and logging
94
+
95
+ - **[OnboardEvents](./docs/onboard-events.md)** `[Added]` - Complete onboarding orchestration for Adobe I/O Events
96
+ - **Comprehensive Event Onboarding**: End-to-end orchestration of providers, event metadata, and registrations
97
+ - **Provider Management**: Create and manage Adobe I/O Events providers with commerce-specific metadata
98
+ - **Event Metadata Creation**: Automated event metadata creation with sample templates
99
+ - **Registration Management**: Complete registration lifecycle with webhook configuration
100
+ - **Automated Summary Logging**: Rich summary reports with visual indicators (โœ… created, โญ๏ธ existing, โŒ failed)
101
+ - **Error Handling**: Robust error handling with detailed logging and recovery mechanisms
102
+ - **Input Validation**: Comprehensive input parsing and validation
103
+ - **TypeScript Support**: Full type definitions for all interfaces and responses
104
+
105
+ - **[RestClient](./docs/rest-client.md)** `[Added]` - HTTP client for external API integration
106
+ - Support for all HTTP methods (GET, POST, PUT, DELETE)
107
+ - Configurable headers and request/response handling
108
+ - Error handling with status code management
109
+ - JSON and text response parsing
110
+ - TypeScript interfaces for headers and responses
111
+
112
+ #### ๐Ÿ“ก I/O Events Components
113
+ - **[EventMetadataManager](./docs/event-metadata.md)** `[Added]` - Manage event metadata for Adobe I/O Events providers
114
+ - Complete CRUD operations for event metadata
115
+ - Sample event template management
116
+ - URL encoding support for event codes
117
+ - Comprehensive error handling and validation
118
+ - TypeScript interfaces for all operations
119
+
120
+ - **[ProviderManager](./docs/provider.md)** `[Added]` - Manage event providers for Adobe I/O Events
121
+ - Provider creation, retrieval, updating, and deletion
122
+ - Support for provider metadata and documentation URLs
123
+ - Query parameter support for filtering
124
+ - Commerce-specific provider enhancements
125
+ - Complete HAL+JSON response handling
126
+
127
+ - **[RegistrationManager](./docs/registration.md)** `[Added]` - Manage event registrations and subscriptions
128
+ - Registration lifecycle management
129
+ - Support for webhook, journal, and EventBridge delivery types
130
+ - Event filtering and subscription management
131
+ - Query parameter support for advanced filtering
132
+ - TypeScript interfaces for all registration models
133
+
134
+ ---
135
+
136
+ ## ๐Ÿ› ๏ธ **Development & Quality Assurance**
137
+
138
+ - **100% Test Coverage**: Comprehensive test suite with 1,135+ test cases covering all components
139
+ - **TypeScript Support**: Full TypeScript implementation with strict configuration
140
+ - **Automated Quality Checks**:
141
+ - Pre-commit hooks with Prettier formatting and ESLint
142
+ - Pre-push validation with type checking and full test suite
143
+ - Conventional commit message validation
144
+ - **Build System**: Modern build pipeline with tsup supporting ESM/CJS dual output
145
+ - **Documentation**: Comprehensive documentation for all components and APIs
146
+ - **Development Workflow**:
147
+ - Watch mode for development
148
+ - Automated validation pipeline
149
+ - Code quality enforcement
150
+
151
+ ---
152
+
153
+ ## ๐Ÿ“ฆ **Package Information**
154
+
155
+ - **Package Name**: `@adobe-commerce/aio-toolkit`
156
+ - **Version**: 1.0.0
157
+ - **Node.js Support**: >=18.0.0
158
+ - **TypeScript Support**: >=4.9.0
159
+ - **License**: Proprietary (Adobe Commerce)
160
+ - **Distribution**: Available via GitHub Packages
161
+
162
+ ### Dependencies
163
+ - `@adobe/aio-lib-ims`: ^7.0.2
164
+ - `@adobe/aio-sdk`: ^5.0.0
165
+ - `got`: ^11.8.6
166
+ - `graphql`: ^16.11.0
167
+ - `node-fetch`: ^2.7.0
168
+ - `oauth-1.0a`: ^2.2.6
169
+ - `openwhisk`: ^3.21.8
170
+
171
+ ---
172
+
173
+ ## ๐ŸŽฏ **Key Features**
174
+
175
+ - **๐Ÿ”„ Complete Adobe I/O Events Integration**: End-to-end event management from provider creation to registration
176
+ - **๐Ÿ” Multi-Authentication Support**: Bearer tokens, OAuth 1.0a, Basic Auth, and Adobe IMS
177
+ - **๐Ÿ“ File System Management**: CRUD operations for Adobe I/O Runtime file storage
178
+ - **๐Ÿ”„ Event Loop Protection**: Advanced infinite loop detection and prevention
179
+ - **๐ŸŒ HTTP Client Utilities**: Robust REST and GraphQL client implementations
180
+ - **โšก Serverless Action Support**: OpenWhisk action wrappers and utilities
181
+ - **๐Ÿ“Š Comprehensive Logging**: Structured logging with detailed summary reports
182
+ - **๐Ÿงช Production Ready**: 100% test coverage with strict quality standards
183
+ - **๐Ÿ“š Full Documentation**: Complete API documentation and usage guides
184
+
185
+ ---
186
+
187
+ ## ๐Ÿš€ **Getting Started**
188
+
189
+ ```bash
190
+ # Install the package
191
+ npm install @adobe-commerce/aio-toolkit
192
+
193
+ # Import components
194
+ import {
195
+ OnboardEvents,
196
+ AdobeCommerceClient,
197
+ RestClient,
198
+ BearerToken,
199
+ InfiniteLoopBreaker
200
+ } from '@adobe-commerce/aio-toolkit';
201
+ ```
202
+
203
+ This release provides a solid foundation for Adobe App Builder backend development with enterprise-grade tooling, comprehensive documentation, and production-ready components.
204
+
205
+ For detailed usage instructions and API documentation, please refer to the individual component documentation linked above.
package/LICENSE ADDED
@@ -0,0 +1,56 @@
1
+ COMMERCIAL INTERNAL USE LICENSE
2
+
3
+ Copyright (c) 2024 Adobe Consulting Services, Commerce Team
4
+
5
+ GRANT OF LICENSE
6
+
7
+ Subject to the terms and conditions of this License, the copyright holders hereby
8
+ grant you a non-exclusive, non-transferable license to use, copy, modify, and
9
+ distribute this software and associated documentation files (the "Software") for
10
+ the following permitted purposes:
11
+
12
+ PERMITTED USES:
13
+ (a) Internal business operations and development activities;
14
+ (b) Client projects and commercial engagements;
15
+ (c) Integration with Adobe App Builder applications;
16
+ (d) Development, testing, and deployment of Adobe Commerce solutions;
17
+ (e) Consulting services and professional services engagements;
18
+ (f) Training and educational purposes within commercial contexts.
19
+
20
+ RESTRICTIONS:
21
+ (a) You may not redistribute the Software as a standalone product or library;
22
+ (b) You may not sublicense the Software to third parties for independent use;
23
+ (c) You may not remove or alter copyright notices and attribution;
24
+ (d) Public distribution of the source code requires explicit written permission;
25
+ (e) Any derivative works must maintain this license and attribution.
26
+
27
+ ATTRIBUTION REQUIREMENTS:
28
+ When using this Software in client projects or commercial engagements, you must:
29
+ (a) Retain all copyright notices in the source code;
30
+ (b) Include attribution in project documentation where applicable;
31
+ (c) Acknowledge the use of this toolkit in professional contexts as appropriate.
32
+
33
+ COMMERCIAL USE CLARIFICATION:
34
+ "Commercial use" explicitly includes but is not limited to:
35
+ (a) Client consulting projects and engagements;
36
+ (b) Adobe Commerce implementation services;
37
+ (c) Custom application development for clients;
38
+ (d) Training and professional services delivery;
39
+ (e) Integration services and solution development.
40
+
41
+ DISCLAIMER OF WARRANTY:
42
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
+ SOFTWARE.
49
+
50
+ TERMINATION:
51
+ This license is effective until terminated. Your rights under this license will
52
+ terminate automatically without notice if you fail to comply with any term(s) of
53
+ this license.
54
+
55
+ For questions regarding licensing terms or permissions beyond those granted herein,
56
+ please contact the copyright holders.