@stripe/link-sdk 0.8.0 → 0.9.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.
@@ -0,0 +1,136 @@
1
+ import { z } from 'zod';
2
+ /** API inputs, independent of CLI flags and framework execution context. */
3
+ export declare const linkToolSchemas: {
4
+ empty: z.ZodObject<{}, z.core.$strict>;
5
+ spendRequestId: z.ZodObject<{
6
+ id: z.ZodString;
7
+ }, z.core.$strict>;
8
+ listSpendRequests: z.ZodObject<{
9
+ include_history: z.ZodOptional<z.ZodBoolean>;
10
+ }, z.core.$strict>;
11
+ retrieveSpendRequest: z.ZodObject<{
12
+ id: z.ZodString;
13
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ }, z.core.$strict>;
15
+ createSpendRequest: z.ZodObject<{
16
+ idempotency_key: z.ZodOptional<z.ZodString>;
17
+ payment_details: z.ZodOptional<z.ZodString>;
18
+ credential_type: z.ZodDefault<z.ZodEnum<{
19
+ card: "card";
20
+ shared_payment_token: "shared_payment_token";
21
+ }>>;
22
+ network_id: z.ZodOptional<z.ZodString>;
23
+ execution_method: z.ZodOptional<z.ZodLiteral<"link_pay_token">>;
24
+ merchant_account_id: z.ZodOptional<z.ZodString>;
25
+ amount: z.ZodNumber;
26
+ currency: z.ZodDefault<z.ZodString>;
27
+ merchant_name: z.ZodOptional<z.ZodString>;
28
+ merchant_url: z.ZodOptional<z.ZodURL>;
29
+ context: z.ZodString;
30
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
31
+ name: z.ZodString;
32
+ quantity: z.ZodOptional<z.ZodNumber>;
33
+ unit_amount: z.ZodOptional<z.ZodNumber>;
34
+ description: z.ZodOptional<z.ZodString>;
35
+ sku: z.ZodOptional<z.ZodString>;
36
+ url: z.ZodOptional<z.ZodString>;
37
+ image_url: z.ZodOptional<z.ZodString>;
38
+ product_url: z.ZodOptional<z.ZodString>;
39
+ totals: z.ZodOptional<z.ZodArray<z.ZodObject<{
40
+ type: z.ZodString;
41
+ display_text: z.ZodString;
42
+ amount: z.ZodNumber;
43
+ }, z.core.$strict>>>;
44
+ }, z.core.$strict>>>;
45
+ totals: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
+ type: z.ZodString;
47
+ display_text: z.ZodString;
48
+ amount: z.ZodNumber;
49
+ }, z.core.$strict>>>;
50
+ request_approval: z.ZodDefault<z.ZodBoolean>;
51
+ test: z.ZodDefault<z.ZodBoolean>;
52
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
53
+ }, z.core.$strict>;
54
+ updateSpendRequest: z.ZodObject<{
55
+ id: z.ZodString;
56
+ payment_details: z.ZodOptional<z.ZodString>;
57
+ amount: z.ZodOptional<z.ZodNumber>;
58
+ currency: z.ZodOptional<z.ZodString>;
59
+ merchant_url: z.ZodOptional<z.ZodURL>;
60
+ profile_id: z.ZodOptional<z.ZodString>;
61
+ merchant_id: z.ZodOptional<z.ZodString>;
62
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
+ name: z.ZodString;
64
+ quantity: z.ZodOptional<z.ZodNumber>;
65
+ unit_amount: z.ZodOptional<z.ZodNumber>;
66
+ description: z.ZodOptional<z.ZodString>;
67
+ sku: z.ZodOptional<z.ZodString>;
68
+ url: z.ZodOptional<z.ZodString>;
69
+ image_url: z.ZodOptional<z.ZodString>;
70
+ product_url: z.ZodOptional<z.ZodString>;
71
+ totals: z.ZodOptional<z.ZodArray<z.ZodObject<{
72
+ type: z.ZodString;
73
+ display_text: z.ZodString;
74
+ amount: z.ZodNumber;
75
+ }, z.core.$strict>>>;
76
+ }, z.core.$strict>>>;
77
+ totals: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
+ type: z.ZodString;
79
+ display_text: z.ZodString;
80
+ amount: z.ZodNumber;
81
+ }, z.core.$strict>>>;
82
+ }, z.core.$strict>;
83
+ listTransactions: z.ZodObject<{
84
+ limit: z.ZodOptional<z.ZodNumber>;
85
+ starting_after: z.ZodOptional<z.ZodString>;
86
+ ending_before: z.ZodOptional<z.ZodString>;
87
+ start_date: z.ZodOptional<z.ZodISODate>;
88
+ end_date: z.ZodOptional<z.ZodISODate>;
89
+ category: z.ZodOptional<z.ZodString>;
90
+ origin: z.ZodOptional<z.ZodEnum<{
91
+ external_connection: "external_connection";
92
+ link: "link";
93
+ }>>;
94
+ sources: z.ZodOptional<z.ZodArray<z.ZodString>>;
95
+ }, z.core.$strict>;
96
+ listSources: z.ZodObject<{
97
+ limit: z.ZodOptional<z.ZodNumber>;
98
+ starting_after: z.ZodOptional<z.ZodString>;
99
+ ending_before: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strict>;
101
+ listBalances: z.ZodObject<{
102
+ limit: z.ZodOptional<z.ZodNumber>;
103
+ starting_after: z.ZodOptional<z.ZodString>;
104
+ ending_before: z.ZodOptional<z.ZodString>;
105
+ sources: z.ZodOptional<z.ZodArray<z.ZodString>>;
106
+ }, z.core.$strict>;
107
+ createReport: z.ZodObject<{
108
+ domain: z.ZodString;
109
+ outcome: z.ZodEnum<{
110
+ abandoned: "abandoned";
111
+ blocked: "blocked";
112
+ success: "success";
113
+ }>;
114
+ spend_request_id: z.ZodString;
115
+ tags: z.ZodOptional<z.ZodArray<z.ZodEnum<{
116
+ "3ds_challenge": "3ds_challenge";
117
+ anti_bot_script: "anti_bot_script";
118
+ captcha: "captcha";
119
+ cdn_block: "cdn_block";
120
+ dns_block: "dns_block";
121
+ login_required: "login_required";
122
+ other: "other";
123
+ page_inaccessible: "page_inaccessible";
124
+ payment_declined: "payment_declined";
125
+ rate_limited: "rate_limited";
126
+ site_error: "site_error";
127
+ stripe_checkout: "stripe_checkout";
128
+ timeout: "timeout";
129
+ waf_block: "waf_block";
130
+ }>>>;
131
+ step: z.ZodOptional<z.ZodString>;
132
+ freeform_context: z.ZodOptional<z.ZodString>;
133
+ attempt_trace: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strict>;
135
+ };
136
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB,4EAA4E;AAC5E,eAAO,MAAM,eAAe;IAC1B,KAAK;IACL,cAAc;;;IACd,iBAAiB;;;IAMjB,oBAAoB;;;;IASpB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsFlB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWlB,gBAAgB;;;;;;;;;;;;;IAQhB,WAAW;;;;;IACX,YAAY;;;;;;IAIZ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcb,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/link-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Node.js SDK for building agents that use Link",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,6 +16,10 @@
16
16
  ".": {
17
17
  "types": "./dist/index.d.ts",
18
18
  "import": "./dist/index.js"
19
+ },
20
+ "./tools": {
21
+ "types": "./dist/tools/index.d.ts",
22
+ "import": "./dist/tools/index.js"
19
23
  }
20
24
  },
21
25
  "license": "MIT",