@bates-solutions/squareup 0.2.0 → 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/README.md +91 -88
- package/package.json +7 -41
- package/dist/angular/__tests__/setup.d.ts +0 -1
- package/dist/angular/__tests__/setup.d.ts.map +0 -1
- package/dist/angular/__tests__/setup.js +0 -5
- package/dist/angular/__tests__/setup.js.map +0 -1
- package/dist/angular/components/index.d.ts +0 -2
- package/dist/angular/components/index.d.ts.map +0 -1
- package/dist/angular/components/index.js +0 -2
- package/dist/angular/components/index.js.map +0 -1
- package/dist/angular/components/payment-button.component.d.ts +0 -49
- package/dist/angular/components/payment-button.component.d.ts.map +0 -1
- package/dist/angular/components/payment-button.component.js +0 -176
- package/dist/angular/components/payment-button.component.js.map +0 -1
- package/dist/angular/directives/index.d.ts +0 -2
- package/dist/angular/directives/index.d.ts.map +0 -1
- package/dist/angular/directives/index.js +0 -2
- package/dist/angular/directives/index.js.map +0 -1
- package/dist/angular/directives/square-card.directive.d.ts +0 -52
- package/dist/angular/directives/square-card.directive.d.ts.map +0 -1
- package/dist/angular/directives/square-card.directive.js +0 -98
- package/dist/angular/directives/square-card.directive.js.map +0 -1
- package/dist/angular/index.d.ts +0 -42
- package/dist/angular/index.d.ts.map +0 -1
- package/dist/angular/index.js +0 -45
- package/dist/angular/index.js.map +0 -1
- package/dist/angular/services/index.d.ts +0 -6
- package/dist/angular/services/index.d.ts.map +0 -1
- package/dist/angular/services/index.js +0 -6
- package/dist/angular/services/index.js.map +0 -1
- package/dist/angular/services/square-catalog.service.d.ts +0 -60
- package/dist/angular/services/square-catalog.service.d.ts.map +0 -1
- package/dist/angular/services/square-catalog.service.js +0 -152
- package/dist/angular/services/square-catalog.service.js.map +0 -1
- package/dist/angular/services/square-customers.service.d.ts +0 -77
- package/dist/angular/services/square-customers.service.d.ts.map +0 -1
- package/dist/angular/services/square-customers.service.js +0 -187
- package/dist/angular/services/square-customers.service.js.map +0 -1
- package/dist/angular/services/square-orders.service.d.ts +0 -66
- package/dist/angular/services/square-orders.service.d.ts.map +0 -1
- package/dist/angular/services/square-orders.service.js +0 -170
- package/dist/angular/services/square-orders.service.js.map +0 -1
- package/dist/angular/services/square-payments.service.d.ts +0 -73
- package/dist/angular/services/square-payments.service.d.ts.map +0 -1
- package/dist/angular/services/square-payments.service.js +0 -167
- package/dist/angular/services/square-payments.service.js.map +0 -1
- package/dist/angular/services/square-sdk.service.d.ts +0 -45
- package/dist/angular/services/square-sdk.service.d.ts.map +0 -1
- package/dist/angular/services/square-sdk.service.js +0 -133
- package/dist/angular/services/square-sdk.service.js.map +0 -1
- package/dist/angular/square.module.d.ts +0 -36
- package/dist/angular/square.module.d.ts.map +0 -1
- package/dist/angular/square.module.js +0 -75
- package/dist/angular/square.module.js.map +0 -1
- package/dist/angular/types.d.ts +0 -189
- package/dist/angular/types.d.ts.map +0 -1
- package/dist/angular/types.js +0 -8
- package/dist/angular/types.js.map +0 -1
- package/dist/react/SquareProvider.d.ts +0 -50
- package/dist/react/SquareProvider.d.ts.map +0 -1
- package/dist/react/SquareProvider.js +0 -134
- package/dist/react/SquareProvider.js.map +0 -1
- package/dist/react/__tests__/CardInput.test.d.ts +0 -2
- package/dist/react/__tests__/CardInput.test.d.ts.map +0 -1
- package/dist/react/__tests__/CardInput.test.js +0 -218
- package/dist/react/__tests__/CardInput.test.js.map +0 -1
- package/dist/react/__tests__/PaymentButton.test.d.ts +0 -2
- package/dist/react/__tests__/PaymentButton.test.d.ts.map +0 -1
- package/dist/react/__tests__/PaymentButton.test.js +0 -400
- package/dist/react/__tests__/PaymentButton.test.js.map +0 -1
- package/dist/react/__tests__/SquareProvider.test.d.ts +0 -2
- package/dist/react/__tests__/SquareProvider.test.d.ts.map +0 -1
- package/dist/react/__tests__/SquareProvider.test.js +0 -126
- package/dist/react/__tests__/SquareProvider.test.js.map +0 -1
- package/dist/react/__tests__/setup.d.ts +0 -2
- package/dist/react/__tests__/setup.d.ts.map +0 -1
- package/dist/react/__tests__/setup.js +0 -3
- package/dist/react/__tests__/setup.js.map +0 -1
- package/dist/react/__tests__/useCatalog.test.d.ts +0 -2
- package/dist/react/__tests__/useCatalog.test.d.ts.map +0 -1
- package/dist/react/__tests__/useCatalog.test.js +0 -277
- package/dist/react/__tests__/useCatalog.test.js.map +0 -1
- package/dist/react/__tests__/useCustomers.test.d.ts +0 -2
- package/dist/react/__tests__/useCustomers.test.d.ts.map +0 -1
- package/dist/react/__tests__/useCustomers.test.js +0 -312
- package/dist/react/__tests__/useCustomers.test.js.map +0 -1
- package/dist/react/__tests__/useOrders.test.d.ts +0 -2
- package/dist/react/__tests__/useOrders.test.d.ts.map +0 -1
- package/dist/react/__tests__/useOrders.test.js +0 -216
- package/dist/react/__tests__/useOrders.test.js.map +0 -1
- package/dist/react/__tests__/usePayments.test.d.ts +0 -2
- package/dist/react/__tests__/usePayments.test.d.ts.map +0 -1
- package/dist/react/__tests__/usePayments.test.js +0 -235
- package/dist/react/__tests__/usePayments.test.js.map +0 -1
- package/dist/react/__tests__/useSquarePayment.test.d.ts +0 -2
- package/dist/react/__tests__/useSquarePayment.test.d.ts.map +0 -1
- package/dist/react/__tests__/useSquarePayment.test.js +0 -447
- package/dist/react/__tests__/useSquarePayment.test.js.map +0 -1
- package/dist/react/components/CardInput.d.ts +0 -69
- package/dist/react/components/CardInput.d.ts.map +0 -1
- package/dist/react/components/CardInput.js +0 -58
- package/dist/react/components/CardInput.js.map +0 -1
- package/dist/react/components/PaymentButton.d.ts +0 -71
- package/dist/react/components/PaymentButton.d.ts.map +0 -1
- package/dist/react/components/PaymentButton.js +0 -140
- package/dist/react/components/PaymentButton.js.map +0 -1
- package/dist/react/components/index.d.ts +0 -5
- package/dist/react/components/index.d.ts.map +0 -1
- package/dist/react/components/index.js +0 -3
- package/dist/react/components/index.js.map +0 -1
- package/dist/react/hooks/index.d.ts +0 -11
- package/dist/react/hooks/index.d.ts.map +0 -1
- package/dist/react/hooks/index.js +0 -6
- package/dist/react/hooks/index.js.map +0 -1
- package/dist/react/hooks/useCatalog.d.ts +0 -98
- package/dist/react/hooks/useCatalog.d.ts.map +0 -1
- package/dist/react/hooks/useCatalog.js +0 -134
- package/dist/react/hooks/useCatalog.js.map +0 -1
- package/dist/react/hooks/useCustomers.d.ts +0 -105
- package/dist/react/hooks/useCustomers.d.ts.map +0 -1
- package/dist/react/hooks/useCustomers.js +0 -174
- package/dist/react/hooks/useCustomers.js.map +0 -1
- package/dist/react/hooks/useOrders.d.ts +0 -112
- package/dist/react/hooks/useOrders.d.ts.map +0 -1
- package/dist/react/hooks/useOrders.js +0 -115
- package/dist/react/hooks/useOrders.js.map +0 -1
- package/dist/react/hooks/usePayments.d.ts +0 -98
- package/dist/react/hooks/usePayments.d.ts.map +0 -1
- package/dist/react/hooks/usePayments.js +0 -89
- package/dist/react/hooks/usePayments.js.map +0 -1
- package/dist/react/hooks/useSquarePayment.d.ts +0 -52
- package/dist/react/hooks/useSquarePayment.d.ts.map +0 -1
- package/dist/react/hooks/useSquarePayment.js +0 -146
- package/dist/react/hooks/useSquarePayment.js.map +0 -1
- package/dist/react/index.d.ts +0 -8
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js +0 -7
- package/dist/react/index.js.map +0 -1
- package/dist/react/types.d.ts +0 -183
- package/dist/react/types.d.ts.map +0 -1
- package/dist/react/types.js +0 -2
- package/dist/react/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/
|
|
2
|
+
<img src="https://img.shields.io/badge/Node.js-18+-339933?logo=node.js&logoColor=white&style=for-the-badge" alt="Node.js" height="28">
|
|
3
3
|
|
|
4
|
-
<img src="https://img.shields.io/badge/
|
|
4
|
+
<img src="https://img.shields.io/badge/TypeScript-5.0+-3178C6?logo=typescript&logoColor=white&style=for-the-badge" alt="TypeScript" height="28">
|
|
5
5
|
|
|
6
6
|
<img src="https://img.shields.io/badge/Square-Payments-0066CC?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iNCIgZmlsbD0iIzAwNjZDQyIvPgo8cGF0aCBkPSJNOC41IDEySDE1LjVWMTMuNUgxMC41VjE1SDE1LjVWMTYuNUgxMC41VjE4SDE1LjVWMTlIMFYxMkg4LjVWMTJIMFYxMkg4LjVWMTJaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K&style=for-the-badge" alt="Square" height="28">
|
|
7
7
|
</p>
|
|
@@ -10,64 +10,33 @@
|
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<strong>The modern TypeScript SDK for Square payments</strong><br>
|
|
13
|
-
Build payment
|
|
13
|
+
Build payment backends with type-safe APIs, fluent builders, and webhook support.
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
|
-
<img src="https://img.shields.io/badge/version-0.1.0-blue.svg" alt="version 0.1.0">
|
|
18
17
|
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
|
19
18
|
<a href="https://typescriptlang.org"><img src="https://img.shields.io/badge/TypeScript-5.0+-blue.svg" alt="TypeScript"></a>
|
|
20
|
-
<br>
|
|
21
|
-
<img src="https://img.shields.io/badge/tests-329%20passed-brightgreen.svg" alt="Tests">
|
|
22
|
-
<img src="https://img.shields.io/badge/coverage-99.84%25-brightgreen.svg" alt="Coverage">
|
|
23
|
-
<img src="https://img.shields.io/badge/React-110%20tests-blue.svg" alt="React Tests">
|
|
24
|
-
<img src="https://img.shields.io/badge/Angular-133%20tests-red.svg" alt="Angular Tests">
|
|
25
19
|
</p>
|
|
26
20
|
|
|
27
21
|
---
|
|
28
22
|
|
|
29
|
-
Stop wrestling with Square's low-level APIs. **squareup** gives you
|
|
23
|
+
Stop wrestling with Square's low-level APIs. **squareup** gives you a simplified client API and fluent builders that make payment integration straightforward. Process payments, manage orders, handle webhooks—all with full TypeScript support and zero boilerplate.
|
|
30
24
|
|
|
31
25
|
## Features
|
|
32
26
|
|
|
33
27
|
- **Simplified APIs** - Less boilerplate, more productivity
|
|
34
|
-
- **React Integration** - Hooks and components for payments
|
|
35
|
-
- **Angular Integration** - Services with RxJS Observables
|
|
36
|
-
- **Server Utilities** - Webhook verification and middleware
|
|
37
28
|
- **Type-Safe** - Full TypeScript support with strict types
|
|
38
29
|
- **Fluent Builders** - Chainable order and payment construction
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
**329 comprehensive tests** with **99.84% code coverage** ensure reliability and maintainability:
|
|
43
|
-
|
|
44
|
-
- **React Tests (110)**: Complete coverage of hooks, components, and integrations
|
|
45
|
-
- **Angular Tests (133)**: Full service testing with RxJS observables
|
|
46
|
-
- **Core Tests (86)**: API clients, builders, and utilities
|
|
47
|
-
- **Coverage Breakdown**:
|
|
48
|
-
- Statements: **99.84%**
|
|
49
|
-
- Branches: **95.99%**
|
|
50
|
-
- Functions: **100%**
|
|
51
|
-
- Lines: **99.84%**
|
|
52
|
-
|
|
53
|
-
Run tests with:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
npm test # All tests
|
|
57
|
-
npm run test:react # React tests only
|
|
58
|
-
npm run test:angular # Angular tests only
|
|
59
|
-
npm run test:coverage # With coverage report
|
|
60
|
-
```
|
|
30
|
+
- **Webhook Support** - Signature verification and middleware for Express/Next.js
|
|
31
|
+
- **Service Classes** - Payments, Orders, Customers, Catalog, Inventory, Subscriptions, Invoices, Loyalty
|
|
61
32
|
|
|
62
33
|
## Requirements
|
|
63
34
|
|
|
64
35
|
| Dependency | Version |
|
|
65
36
|
| ---------- | ------- |
|
|
66
37
|
| Square SDK | ^43.0.0 |
|
|
67
|
-
| Node.js |
|
|
38
|
+
| Node.js | 22+ |
|
|
68
39
|
| TypeScript | 5.0+ |
|
|
69
|
-
| React | 18+ (optional) |
|
|
70
|
-
| Angular | 17+ (optional) |
|
|
71
40
|
|
|
72
41
|
## Installation
|
|
73
42
|
|
|
@@ -75,26 +44,9 @@ npm run test:coverage # With coverage report
|
|
|
75
44
|
npm install @bates-solutions/squareup square
|
|
76
45
|
```
|
|
77
46
|
|
|
78
|
-
### Peer Dependencies
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
# For React integration
|
|
82
|
-
npm install react
|
|
83
|
-
|
|
84
|
-
# For Angular integration
|
|
85
|
-
npm install @angular/core @angular/common rxjs
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## 📚 Documentation
|
|
89
|
-
|
|
90
|
-
- **[Getting Started](./docs/getting-started/)** - Installation and setup guides
|
|
91
|
-
- **[Guides](./docs/guides/)** - Framework-specific tutorials and examples
|
|
92
|
-
- **[API Reference](./docs/api-reference.md)** - Complete API documentation
|
|
93
|
-
- **[Configuration](./docs/getting-started/configuration.md)** - Environment setup
|
|
94
|
-
|
|
95
47
|
## Quick Start
|
|
96
48
|
|
|
97
|
-
###
|
|
49
|
+
### Basic Usage
|
|
98
50
|
|
|
99
51
|
```typescript
|
|
100
52
|
import { createSquareClient } from '@bates-solutions/squareup';
|
|
@@ -104,55 +56,106 @@ const client = createSquareClient({
|
|
|
104
56
|
environment: 'sandbox',
|
|
105
57
|
});
|
|
106
58
|
|
|
59
|
+
// Process a payment
|
|
107
60
|
const payment = await client.payments.create({
|
|
108
61
|
sourceId: 'cnon:card-nonce',
|
|
109
62
|
amount: 1000, // $10.00
|
|
110
63
|
currency: 'USD',
|
|
111
64
|
});
|
|
65
|
+
|
|
66
|
+
// Create an order with the fluent builder
|
|
67
|
+
const order = await client.orders.create(
|
|
68
|
+
client.orders
|
|
69
|
+
.builder()
|
|
70
|
+
.addItem({ name: 'Coffee', quantity: 2, amount: 450 })
|
|
71
|
+
.addItem({ name: 'Muffin', quantity: 1, amount: 350 })
|
|
72
|
+
.build()
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
// Manage customers
|
|
76
|
+
const customer = await client.customers.create({
|
|
77
|
+
givenName: 'John',
|
|
78
|
+
familyName: 'Doe',
|
|
79
|
+
emailAddress: 'john@example.com',
|
|
80
|
+
});
|
|
112
81
|
```
|
|
113
82
|
|
|
114
|
-
###
|
|
83
|
+
### Webhook Handling (Express)
|
|
115
84
|
|
|
116
|
-
```
|
|
117
|
-
import
|
|
85
|
+
```typescript
|
|
86
|
+
import express from 'express';
|
|
87
|
+
import { createWebhookHandler, rawBodyMiddleware } from '@bates-solutions/squareup/server';
|
|
118
88
|
|
|
119
|
-
|
|
120
|
-
return (
|
|
121
|
-
<SquareProvider applicationId="sq0idp-xxx" locationId="LXXX" environment="sandbox">
|
|
122
|
-
<PaymentForm />
|
|
123
|
-
</SquareProvider>
|
|
124
|
-
);
|
|
125
|
-
}
|
|
89
|
+
const app = express();
|
|
126
90
|
|
|
127
|
-
|
|
128
|
-
|
|
91
|
+
// Use raw body middleware before JSON parsing for webhook routes
|
|
92
|
+
app.use('/webhooks/square', rawBodyMiddleware);
|
|
93
|
+
app.use(express.json());
|
|
129
94
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
95
|
+
const webhookHandler = createWebhookHandler({
|
|
96
|
+
signatureKey: process.env.SQUARE_WEBHOOK_SIGNATURE_KEY!,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
app.post('/webhooks/square', (req, res) => {
|
|
100
|
+
const event = webhookHandler.verifyAndParse(req);
|
|
101
|
+
|
|
102
|
+
switch (event.type) {
|
|
103
|
+
case 'payment.completed':
|
|
104
|
+
console.log('Payment completed:', event.data);
|
|
105
|
+
break;
|
|
106
|
+
case 'order.created':
|
|
107
|
+
console.log('Order created:', event.data);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
res.sendStatus(200);
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Webhook Handling (Next.js)
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
// app/api/webhooks/square/route.ts
|
|
119
|
+
import { createWebhookHandler } from '@bates-solutions/squareup/server';
|
|
137
120
|
|
|
138
|
-
|
|
121
|
+
const webhookHandler = createWebhookHandler({
|
|
122
|
+
signatureKey: process.env.SQUARE_WEBHOOK_SIGNATURE_KEY!,
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
export async function POST(request: Request) {
|
|
126
|
+
const body = await request.text();
|
|
127
|
+
const signature = request.headers.get('x-square-hmacsha256-signature')!;
|
|
128
|
+
|
|
129
|
+
const event = webhookHandler.verifyAndParse(body, signature);
|
|
130
|
+
|
|
131
|
+
// Handle the event
|
|
132
|
+
console.log('Received event:', event.type);
|
|
133
|
+
|
|
134
|
+
return new Response('OK', { status: 200 });
|
|
139
135
|
}
|
|
140
136
|
```
|
|
141
137
|
|
|
142
|
-
|
|
138
|
+
## Available Services
|
|
139
|
+
|
|
140
|
+
| Service | Description |
|
|
141
|
+
| --------------- | ------------------------------------ |
|
|
142
|
+
| `payments` | Process and manage payments |
|
|
143
|
+
| `orders` | Create and manage orders |
|
|
144
|
+
| `customers` | Customer management |
|
|
145
|
+
| `catalog` | Product catalog operations |
|
|
146
|
+
| `inventory` | Inventory tracking |
|
|
147
|
+
| `subscriptions` | Subscription management |
|
|
148
|
+
| `invoices` | Invoice operations |
|
|
149
|
+
| `loyalty` | Loyalty program management |
|
|
150
|
+
|
|
151
|
+
## Utilities
|
|
143
152
|
|
|
144
153
|
```typescript
|
|
145
|
-
import {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
accessToken: 'YOUR_ACCESS_TOKEN',
|
|
151
|
-
environment: 'sandbox',
|
|
152
|
-
}),
|
|
153
|
-
],
|
|
154
|
-
})
|
|
155
|
-
export class AppModule {}
|
|
154
|
+
import { toCents, fromCents, formatMoney } from '@bates-solutions/squareup';
|
|
155
|
+
|
|
156
|
+
toCents(10.99); // 1099
|
|
157
|
+
fromCents(1099); // 10.99
|
|
158
|
+
formatMoney(1099, 'USD'); // "$10.99"
|
|
156
159
|
```
|
|
157
160
|
|
|
158
161
|
## Contributing
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bates-solutions/squareup",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "TypeScript wrapper for Square API with
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript wrapper for Square API with webhook support for Node.js backends",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/core/index.js",
|
|
7
7
|
"types": "./dist/core/index.d.ts",
|
|
@@ -10,14 +10,6 @@
|
|
|
10
10
|
"types": "./dist/core/index.d.ts",
|
|
11
11
|
"import": "./dist/core/index.js"
|
|
12
12
|
},
|
|
13
|
-
"./react": {
|
|
14
|
-
"types": "./dist/react/index.d.ts",
|
|
15
|
-
"import": "./dist/react/index.js"
|
|
16
|
-
},
|
|
17
|
-
"./angular": {
|
|
18
|
-
"types": "./dist/angular/index.d.ts",
|
|
19
|
-
"import": "./dist/angular/index.js"
|
|
20
|
-
},
|
|
21
13
|
"./server": {
|
|
22
14
|
"types": "./dist/server/index.d.ts",
|
|
23
15
|
"import": "./dist/server/index.js"
|
|
@@ -37,8 +29,6 @@
|
|
|
37
29
|
"test": "vitest run",
|
|
38
30
|
"test:watch": "vitest",
|
|
39
31
|
"test:coverage": "vitest run --coverage",
|
|
40
|
-
"test:react": "vitest run --config vitest.react.config.ts",
|
|
41
|
-
"test:angular": "vitest run --config vitest.angular.config.ts",
|
|
42
32
|
"docs": "typedoc",
|
|
43
33
|
"prepublishOnly": "npm run build"
|
|
44
34
|
},
|
|
@@ -47,11 +37,10 @@
|
|
|
47
37
|
"square-api",
|
|
48
38
|
"payments",
|
|
49
39
|
"payment-processing",
|
|
50
|
-
"react",
|
|
51
|
-
"react-hooks",
|
|
52
|
-
"angular",
|
|
53
40
|
"typescript",
|
|
54
|
-
"
|
|
41
|
+
"nodejs",
|
|
42
|
+
"backend",
|
|
43
|
+
"webhooks",
|
|
55
44
|
"ecommerce",
|
|
56
45
|
"point-of-sale",
|
|
57
46
|
"pos",
|
|
@@ -69,53 +58,30 @@
|
|
|
69
58
|
},
|
|
70
59
|
"homepage": "https://github.com/mbates/squareup#readme",
|
|
71
60
|
"engines": {
|
|
72
|
-
"node": ">=
|
|
61
|
+
"node": ">=22"
|
|
73
62
|
},
|
|
74
63
|
"peerDependencies": {
|
|
75
|
-
"@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
76
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
77
64
|
"square": "^43.2.1"
|
|
78
65
|
},
|
|
79
|
-
"peerDependenciesMeta": {
|
|
80
|
-
"react": {
|
|
81
|
-
"optional": true
|
|
82
|
-
},
|
|
83
|
-
"@angular/core": {
|
|
84
|
-
"optional": true
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
66
|
"devDependencies": {
|
|
88
|
-
"@angular/common": "^21.0.6",
|
|
89
|
-
"@angular/core": "^21.0.6",
|
|
90
|
-
"@angular/platform-browser": "^21.0.6",
|
|
91
|
-
"@angular/platform-browser-dynamic": "^21.0.6",
|
|
92
67
|
"@eslint/js": "^9.39.2",
|
|
93
68
|
"@semantic-release/changelog": "^6.0.3",
|
|
94
69
|
"@semantic-release/git": "^10.0.1",
|
|
95
|
-
"@testing-library/dom": "^10.4.1",
|
|
96
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
97
|
-
"@testing-library/react": "^16.3.1",
|
|
98
70
|
"@types/express": "^5.0.6",
|
|
99
71
|
"@types/node": "^25.0.3",
|
|
100
|
-
"@types/react": "^19.2.7",
|
|
101
72
|
"@typescript-eslint/eslint-plugin": "^8.51.0",
|
|
102
73
|
"@typescript-eslint/parser": "^8.51.0",
|
|
103
74
|
"@vitest/coverage-v8": "^4.0.0",
|
|
104
75
|
"eslint": "^9.39.2",
|
|
105
76
|
"eslint-config-prettier": "^10.1.8",
|
|
106
77
|
"eslint-plugin-prettier": "^5.1.0",
|
|
107
|
-
"jsdom": "^27.4.0",
|
|
108
78
|
"prettier": "^3.2.0",
|
|
109
|
-
"react": "^19.2.3",
|
|
110
|
-
"react-dom": "^19.2.3",
|
|
111
|
-
"rxjs": "^7.8.2",
|
|
112
79
|
"semantic-release": "^25.0.2",
|
|
113
80
|
"square": "^43.2.1",
|
|
114
81
|
"typedoc": "^0.28.15",
|
|
115
82
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
116
83
|
"typescript": "^5.3.0",
|
|
117
84
|
"typescript-eslint": "^8.51.0",
|
|
118
|
-
"vitest": "^4.0.16"
|
|
119
|
-
"zone.js": "^0.16.0"
|
|
85
|
+
"vitest": "^4.0.16"
|
|
120
86
|
}
|
|
121
87
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/angular/__tests__/setup.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/angular/__tests__/setup.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,iDAAiD;AACjD,sDAAsD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/angular/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/angular/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { SquareSdkService } from '../services/square-sdk.service.js';
|
|
3
|
-
import type { DigitalWalletOptions } from '../types.js';
|
|
4
|
-
/**
|
|
5
|
-
* Payment button component for Google Pay / Apple Pay
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```html
|
|
9
|
-
* <square-payment-button
|
|
10
|
-
* type="googlePay"
|
|
11
|
-
* (payment)="onPayment($event)"
|
|
12
|
-
* (error)="onError($event)"
|
|
13
|
-
* ></square-payment-button>
|
|
14
|
-
*
|
|
15
|
-
* <square-payment-button
|
|
16
|
-
* type="applePay"
|
|
17
|
-
* [buttonOptions]="{ buttonColor: 'black' }"
|
|
18
|
-
* (payment)="onPayment($event)"
|
|
19
|
-
* ></square-payment-button>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare class PaymentButtonComponent implements OnInit, OnDestroy {
|
|
23
|
-
private sdk;
|
|
24
|
-
private cdr;
|
|
25
|
-
/** Payment method type */
|
|
26
|
-
type: 'googlePay' | 'applePay';
|
|
27
|
-
/** Button styling options */
|
|
28
|
-
buttonOptions?: DigitalWalletOptions;
|
|
29
|
-
/** Emits when button is ready */
|
|
30
|
-
buttonReady: EventEmitter<void>;
|
|
31
|
-
/** Emits payment token on success */
|
|
32
|
-
payment: EventEmitter<string>;
|
|
33
|
-
/** Emits when an error occurs */
|
|
34
|
-
error: EventEmitter<Error>;
|
|
35
|
-
/** Emits when payment is cancelled */
|
|
36
|
-
cancel: EventEmitter<void>;
|
|
37
|
-
private containerRef;
|
|
38
|
-
private paymentMethod;
|
|
39
|
-
private subscription?;
|
|
40
|
-
ready: boolean;
|
|
41
|
-
loading: boolean;
|
|
42
|
-
constructor(sdk: SquareSdkService, cdr: ChangeDetectorRef);
|
|
43
|
-
ngOnInit(): void;
|
|
44
|
-
ngOnDestroy(): void;
|
|
45
|
-
handleClick(): void;
|
|
46
|
-
private initializePaymentMethod;
|
|
47
|
-
private tokenize;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=payment-button.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment-button.component.d.ts","sourceRoot":"","sources":["../../../src/angular/components/payment-button.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,MAAM,EACN,SAAS,EAGT,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,KAAK,EAAuB,oBAAoB,EAAe,MAAM,aAAa,CAAC;AAE1F;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAkBa,sBAAuB,YAAW,MAAM,EAAE,SAAS;IA6B5D,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,GAAG;IA7Bb,0BAA0B;IACjB,IAAI,EAAE,WAAW,GAAG,UAAU,CAAe;IAEtD,6BAA6B;IACpB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAE9C,iCAAiC;IACvB,WAAW,qBAA4B;IAEjD,qCAAqC;IAC3B,OAAO,uBAA8B;IAE/C,iCAAiC;IACvB,KAAK,sBAA6B;IAE5C,sCAAsC;IAC5B,MAAM,qBAA4B;IAG5C,OAAO,CAAC,YAAY,CAA2B;IAE/C,OAAO,CAAC,aAAa,CAAqC;IAC1D,OAAO,CAAC,YAAY,CAAC,CAAe;IAEpC,KAAK,UAAS;IACd,OAAO,UAAS;gBAGN,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB;IAGhC,QAAQ,IAAI,IAAI;IAWhB,WAAW,IAAI,IAAI;IAQnB,WAAW,IAAI,IAAI;YAQL,uBAAuB;YAyBvB,QAAQ;CA4BvB"}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { Component, Input, Output, EventEmitter, ElementRef, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef, } from '@angular/core';
|
|
11
|
-
import { SquareSdkService } from '../services/square-sdk.service.js';
|
|
12
|
-
/**
|
|
13
|
-
* Payment button component for Google Pay / Apple Pay
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```html
|
|
17
|
-
* <square-payment-button
|
|
18
|
-
* type="googlePay"
|
|
19
|
-
* (payment)="onPayment($event)"
|
|
20
|
-
* (error)="onError($event)"
|
|
21
|
-
* ></square-payment-button>
|
|
22
|
-
*
|
|
23
|
-
* <square-payment-button
|
|
24
|
-
* type="applePay"
|
|
25
|
-
* [buttonOptions]="{ buttonColor: 'black' }"
|
|
26
|
-
* (payment)="onPayment($event)"
|
|
27
|
-
* ></square-payment-button>
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
let PaymentButtonComponent = class PaymentButtonComponent {
|
|
31
|
-
sdk;
|
|
32
|
-
cdr;
|
|
33
|
-
/** Payment method type */
|
|
34
|
-
type = 'googlePay';
|
|
35
|
-
/** Button styling options */
|
|
36
|
-
buttonOptions;
|
|
37
|
-
/** Emits when button is ready */
|
|
38
|
-
buttonReady = new EventEmitter();
|
|
39
|
-
/** Emits payment token on success */
|
|
40
|
-
payment = new EventEmitter();
|
|
41
|
-
/** Emits when an error occurs */
|
|
42
|
-
error = new EventEmitter();
|
|
43
|
-
/** Emits when payment is cancelled */
|
|
44
|
-
cancel = new EventEmitter();
|
|
45
|
-
containerRef;
|
|
46
|
-
paymentMethod = null;
|
|
47
|
-
subscription;
|
|
48
|
-
ready = false;
|
|
49
|
-
loading = false;
|
|
50
|
-
constructor(sdk, cdr) {
|
|
51
|
-
this.sdk = sdk;
|
|
52
|
-
this.cdr = cdr;
|
|
53
|
-
}
|
|
54
|
-
ngOnInit() {
|
|
55
|
-
this.subscription = this.sdk.whenReady().subscribe({
|
|
56
|
-
next: (payments) => {
|
|
57
|
-
void this.initializePaymentMethod(payments);
|
|
58
|
-
},
|
|
59
|
-
error: (err) => {
|
|
60
|
-
this.error.emit(err);
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
ngOnDestroy() {
|
|
65
|
-
this.subscription?.unsubscribe();
|
|
66
|
-
if (this.paymentMethod) {
|
|
67
|
-
void this.paymentMethod.destroy();
|
|
68
|
-
this.paymentMethod = null;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
handleClick() {
|
|
72
|
-
if (!this.paymentMethod || this.loading) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
void this.tokenize();
|
|
76
|
-
}
|
|
77
|
-
async initializePaymentMethod(payments) {
|
|
78
|
-
try {
|
|
79
|
-
if (this.type === 'googlePay') {
|
|
80
|
-
this.paymentMethod = await payments.googlePay({});
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.paymentMethod = await payments.applePay({});
|
|
84
|
-
}
|
|
85
|
-
await this.paymentMethod.attach(this.containerRef.nativeElement, this.buttonOptions);
|
|
86
|
-
this.ready = true;
|
|
87
|
-
this.buttonReady.emit();
|
|
88
|
-
this.cdr.markForCheck();
|
|
89
|
-
}
|
|
90
|
-
catch (err) {
|
|
91
|
-
const error = err instanceof Error ? err : new Error(`Failed to initialize ${this.type}`);
|
|
92
|
-
this.error.emit(error);
|
|
93
|
-
this.cdr.markForCheck();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async tokenize() {
|
|
97
|
-
if (!this.paymentMethod) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
this.loading = true;
|
|
101
|
-
this.cdr.markForCheck();
|
|
102
|
-
try {
|
|
103
|
-
const result = await this.paymentMethod.tokenize();
|
|
104
|
-
if (result.status === 'OK' && result.token) {
|
|
105
|
-
this.payment.emit(result.token);
|
|
106
|
-
}
|
|
107
|
-
else if (result.status === 'Cancel') {
|
|
108
|
-
this.cancel.emit();
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
const errorMessage = result.errors?.map((e) => e.message).join(', ') ?? 'Payment failed';
|
|
112
|
-
throw new Error(errorMessage);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
catch (err) {
|
|
116
|
-
const error = err instanceof Error ? err : new Error('Payment failed');
|
|
117
|
-
this.error.emit(error);
|
|
118
|
-
}
|
|
119
|
-
finally {
|
|
120
|
-
this.loading = false;
|
|
121
|
-
this.cdr.markForCheck();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
__decorate([
|
|
126
|
-
Input(),
|
|
127
|
-
__metadata("design:type", String)
|
|
128
|
-
], PaymentButtonComponent.prototype, "type", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
Input(),
|
|
131
|
-
__metadata("design:type", Object)
|
|
132
|
-
], PaymentButtonComponent.prototype, "buttonOptions", void 0);
|
|
133
|
-
__decorate([
|
|
134
|
-
Output(),
|
|
135
|
-
__metadata("design:type", Object)
|
|
136
|
-
], PaymentButtonComponent.prototype, "buttonReady", void 0);
|
|
137
|
-
__decorate([
|
|
138
|
-
Output(),
|
|
139
|
-
__metadata("design:type", Object)
|
|
140
|
-
], PaymentButtonComponent.prototype, "payment", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
Output(),
|
|
143
|
-
__metadata("design:type", Object)
|
|
144
|
-
], PaymentButtonComponent.prototype, "error", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
Output(),
|
|
147
|
-
__metadata("design:type", Object)
|
|
148
|
-
], PaymentButtonComponent.prototype, "cancel", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
ViewChild('buttonContainer', { static: true }),
|
|
151
|
-
__metadata("design:type", ElementRef)
|
|
152
|
-
], PaymentButtonComponent.prototype, "containerRef", void 0);
|
|
153
|
-
PaymentButtonComponent = __decorate([
|
|
154
|
-
Component({
|
|
155
|
-
selector: 'square-payment-button',
|
|
156
|
-
standalone: true,
|
|
157
|
-
template: `
|
|
158
|
-
<div
|
|
159
|
-
#buttonContainer
|
|
160
|
-
[style.minHeight.px]="48"
|
|
161
|
-
[style.cursor]="ready && !loading ? 'pointer' : 'default'"
|
|
162
|
-
[style.opacity]="loading ? 0.7 : 1"
|
|
163
|
-
(click)="handleClick()"
|
|
164
|
-
role="button"
|
|
165
|
-
[attr.tabindex]="ready ? 0 : -1"
|
|
166
|
-
[attr.aria-disabled]="!ready || loading"
|
|
167
|
-
[attr.aria-label]="'Pay with ' + (type === 'googlePay' ? 'Google Pay' : 'Apple Pay')"
|
|
168
|
-
></div>
|
|
169
|
-
`,
|
|
170
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
171
|
-
}),
|
|
172
|
-
__metadata("design:paramtypes", [SquareSdkService,
|
|
173
|
-
ChangeDetectorRef])
|
|
174
|
-
], PaymentButtonComponent);
|
|
175
|
-
export { PaymentButtonComponent };
|
|
176
|
-
//# sourceMappingURL=payment-button.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment-button.component.js","sourceRoot":"","sources":["../../../src/angular/components/payment-button.component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,SAAS,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E;;2DAAwC;AAGvC;IAAT,MAAM,EAAE;;uDAAsC;AAGrC;IAAT,MAAM,EAAE;;qDAAmC;AAGlC;IAAT,MAAM,EAAE;;sDAAmC;AAGpC;IADP,SAAS,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;8BACxB,UAAU;4DAAc;AApBpC,sBAAsB;IAlBlC,SAAS,CAAC;QACT,QAAQ,EAAE,uBAAuB;QACjC,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE;;;;;;;;;;;;GAYT;QACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;KAChD,CAAC;qCA8Be,gBAAgB;QAChB,iBAAiB;GA9BrB,sBAAsB,CAiHlC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/angular/directives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/angular/directives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
|