wallet 2.1.602 → 2.1.603

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 CHANGED
@@ -51,22 +51,11 @@ Full API reference and guides live in the [Wallet Developer Hub](https://wallet.
51
51
 
52
52
  ## Examples
53
53
 
54
- - [Create and manipulate Membership Tiers](#create-and-manipulate-membership-tiers)
55
- - [Create and manipulate Payment Designs](#create-and-manipulate-payment-designs)
56
- - [Create and manipulate Club Members](#create-and-manipulate-club-members)
57
- - [Create and manipulate Advertisement Credits](#create-and-manipulate-advertisement-credits)
58
- - [Create and manipulate Link Book Links](#create-and-manipulate-link-book-links)
59
- - [Create and manipulate Merchant URLs](#create-and-manipulate-merchant-urls)
60
- - [Create and manipulate News Articles](#create-and-manipulate-news-articles)
61
- - [Create and manipulate Performances](#create-and-manipulate-performances)
62
- - [Create and manipulate Promo Codes](#create-and-manipulate-promo-codes)
63
- - [Create and manipulate Merchant Credits](#create-and-manipulate-merchant-credits)
64
- - [Create and manipulate Dynamic Vouchers](#create-and-manipulate-dynamic-vouchers)
65
- - [Create and manipulate Static Voucher Campaigns](#create-and-manipulate-static-voucher-campaigns)
66
- - [Create and manipulate Static Vouchers](#create-and-manipulate-static-vouchers)
67
- - [Create and manipulate SMSes](#create-and-manipulate-smses)
68
-
69
- ### Create and manipulate Membership Tiers
54
+ Click any example to expand the full runnable snippet.
55
+
56
+
57
+ <details>
58
+ <summary><b>Create and manipulate Membership Tiers</b></summary>
70
59
 
71
60
  ```typescript
72
61
  import * as api from "wallet";
@@ -149,7 +138,10 @@ async function membershipTiers() {
149
138
  }
150
139
  ```
151
140
 
152
- ### Create and manipulate Payment Designs
141
+ </details>
142
+
143
+ <details>
144
+ <summary><b>Create and manipulate Payment Designs</b></summary>
153
145
 
154
146
  ```typescript
155
147
  import * as api from "wallet";
@@ -222,7 +214,10 @@ async function paymentDesigns() {
222
214
  }
223
215
  ```
224
216
 
225
- ### Create and manipulate Club Members
217
+ </details>
218
+
219
+ <details>
220
+ <summary><b>Create and manipulate Club Members</b></summary>
226
221
 
227
222
  ```typescript
228
223
  import * as api from "wallet";
@@ -314,7 +309,10 @@ async function clubMembers() {
314
309
  }
315
310
  ```
316
311
 
317
- ### Create and manipulate Advertisement Credits
312
+ </details>
313
+
314
+ <details>
315
+ <summary><b>Create and manipulate Advertisement Credits</b></summary>
318
316
 
319
317
  ```typescript
320
318
  import * as api from "wallet";
@@ -390,7 +388,10 @@ async function advertisementCredits() {
390
388
  }
391
389
  ```
392
390
 
393
- ### Create and manipulate Link Book Links
391
+ </details>
392
+
393
+ <details>
394
+ <summary><b>Create and manipulate Link Book Links</b></summary>
394
395
 
395
396
  ```typescript
396
397
  import * as api from "wallet";
@@ -453,7 +454,10 @@ async function linkBook() {
453
454
  }
454
455
  ```
455
456
 
456
- ### Create and manipulate Merchant URLs
457
+ </details>
458
+
459
+ <details>
460
+ <summary><b>Create and manipulate Merchant URLs</b></summary>
457
461
 
458
462
  ```typescript
459
463
  import * as api from "wallet";
@@ -521,7 +525,10 @@ async function merchantURLs() {
521
525
  }
522
526
  ```
523
527
 
524
- ### Create and manipulate News Articles
528
+ </details>
529
+
530
+ <details>
531
+ <summary><b>Create and manipulate News Articles</b></summary>
525
532
 
526
533
  ```typescript
527
534
  import * as api from "wallet";
@@ -585,7 +592,10 @@ async function news() {
585
592
  }
586
593
  ```
587
594
 
588
- ### Create and manipulate Performances
595
+ </details>
596
+
597
+ <details>
598
+ <summary><b>Create and manipulate Performances</b></summary>
589
599
 
590
600
  ```typescript
591
601
  import * as api from "wallet";
@@ -653,7 +663,10 @@ async function performances() {
653
663
  }
654
664
  ```
655
665
 
656
- ### Create and manipulate Promo Codes
666
+ </details>
667
+
668
+ <details>
669
+ <summary><b>Create and manipulate Promo Codes</b></summary>
657
670
 
658
671
  ```typescript
659
672
  import * as api from "wallet";
@@ -718,7 +731,10 @@ async function promocodes() {
718
731
  }
719
732
  ```
720
733
 
721
- ### Create and manipulate Merchant Credits
734
+ </details>
735
+
736
+ <details>
737
+ <summary><b>Create and manipulate Merchant Credits</b></summary>
722
738
 
723
739
  ```typescript
724
740
  import * as api from "wallet";
@@ -808,7 +824,10 @@ async function merchantCredits() {
808
824
  }
809
825
  ```
810
826
 
811
- ### Create and manipulate Dynamic Vouchers
827
+ </details>
828
+
829
+ <details>
830
+ <summary><b>Create and manipulate Dynamic Vouchers</b></summary>
812
831
 
813
832
  ```typescript
814
833
  import * as api from "wallet";
@@ -920,7 +939,10 @@ async function dynamicVouchers() {
920
939
  }
921
940
  ```
922
941
 
923
- ### Create and manipulate Static Voucher Campaigns
942
+ </details>
943
+
944
+ <details>
945
+ <summary><b>Create and manipulate Static Voucher Campaigns</b></summary>
924
946
 
925
947
  ```typescript
926
948
  import * as api from "wallet";
@@ -1117,7 +1139,10 @@ async function staticVoucherCampaigns() {
1117
1139
  }
1118
1140
  ```
1119
1141
 
1120
- ### Create and manipulate Static Vouchers
1142
+ </details>
1143
+
1144
+ <details>
1145
+ <summary><b>Create and manipulate Static Vouchers</b></summary>
1121
1146
 
1122
1147
  ```typescript
1123
1148
  import * as api from "wallet";
@@ -1189,7 +1214,10 @@ async function staticVouchers() {
1189
1214
  }
1190
1215
  ```
1191
1216
 
1192
- ### Create and manipulate SMSes
1217
+ </details>
1218
+
1219
+ <details>
1220
+ <summary><b>Create and manipulate SMSes</b></summary>
1193
1221
 
1194
1222
  ```typescript
1195
1223
  import * as api from "wallet";
@@ -1498,3 +1526,5 @@ async function smsExample() {
1498
1526
  console.log(`Max: ${limits.max}, Sent: ${limits.sent}`);
1499
1527
  }
1500
1528
  ```
1529
+
1530
+ </details>
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "wallet", "version": "2.1.602", "description": "Official server-side TypeScript / Node.js SDK for the Wallet Inc CRM & Digital Payments platform.", "repository": "git://github.com/WalletInc/sdk-ts.git", "main": "dist/api.js", "types": "dist/api.d.ts", "scripts": {"clean": "rm -Rf node_modules/ *.js", "build": "tsc", "test": "npm run build && node dist/client.js"}, "author": "Wallet Inc Development Team", "license": "UNLICENSED", "dependencies": {"bluebird": "^3.5.0", "request": "^2.81.0", "rewire": "^3.0.2"}, "devDependencies": {"@types/bluebird": "^3.5.33", "@types/node": "^12", "@types/request": "^2.48.8", "typescript": "^4.0"}, "publishConfig": {"registry": "https://registry.npmjs.org"}, "homepage": "https://wallet.dev", "bugs": {"url": "https://github.com/WalletInc/sdk-ts/issues"}, "keywords": ["wallet", "wallet-inc", "sdk", "api", "crm", "payments", "rewards", "vouchers", "loyalty", "membership", "sms"]}
1
+ {"name":"wallet","version":"2.1.603","description":"Official server-side TypeScript / Node.js SDK for the Wallet Inc CRM & Digital Payments platform.","repository":"git://github.com/WalletInc/sdk-ts.git","main":"dist/api.js","types":"dist/api.d.ts","scripts":{"clean":"rm -Rf node_modules/ *.js","build":"tsc","test":"npm run build && node dist/client.js"},"author":"Wallet Inc Development Team","license":"UNLICENSED","dependencies":{"bluebird":"^3.5.0","request":"^2.81.0","rewire":"^3.0.2"},"devDependencies":{"@types/bluebird":"^3.5.33","@types/node":"^12","@types/request":"^2.48.8","typescript":"^4.0"},"publishConfig":{"registry":"https://registry.npmjs.org"},"homepage":"https://wallet.dev","bugs":{"url":"https://github.com/WalletInc/sdk-ts/issues"},"keywords":["wallet","wallet-inc","sdk","api","crm","payments","rewards","vouchers","loyalty","membership","sms"]}
@@ -72,20 +72,13 @@ Full API reference and guides live in the [Wallet Developer Hub](https://wallet.
72
72
 
73
73
  ## Examples
74
74
 
75
- """
76
-
75
+ Click any example to expand the full runnable snippet.
77
76
 
78
- def anchor(title):
79
- # Matches GitHub/npm heading slugs: lowercase, spaces -> hyphens.
80
- return title.lower().replace(" ", "-")
77
+ """
81
78
 
82
79
 
83
80
  readme = header
84
81
 
85
- # Table of contents
86
- for title in file_title_map.values():
87
- readme += "- [{title}](#{slug})\n".format(title=title, slug=anchor(title))
88
-
89
82
  examples_dir = os.path.join(os.getcwd(), "examples")
90
83
 
91
84
  for file in file_title_map:
@@ -100,7 +93,13 @@ for file in file_title_map:
100
93
  continue
101
94
 
102
95
  content = open(path).read().strip()
103
- readme += "\n### " + title + "\n\n```typescript\n" + content + "\n```\n"
96
+ # Collapsible so all examples stay available without making the page enormous.
97
+ readme += (
98
+ "\n<details>\n"
99
+ "<summary><b>" + title + "</b></summary>\n\n"
100
+ "```typescript\n" + content + "\n```\n\n"
101
+ "</details>\n"
102
+ )
104
103
 
105
104
  with open("README.md", "w") as f:
106
105
  f.write(readme)