@stripe/link-sdk 0.6.0 → 0.8.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.
Files changed (37) hide show
  1. package/README.md +7 -1
  2. package/dist/client.d.ts +4 -2
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +749 -373
  7. package/dist/index.js.map +1 -1
  8. package/dist/resources/__tests__/approval-policy.test.d.ts +2 -0
  9. package/dist/resources/__tests__/approval-policy.test.d.ts.map +1 -0
  10. package/dist/resources/__tests__/credentials.test.d.ts +2 -0
  11. package/dist/resources/__tests__/credentials.test.d.ts.map +1 -0
  12. package/dist/resources/__tests__/holder-jwk.test.d.ts +2 -0
  13. package/dist/resources/__tests__/holder-jwk.test.d.ts.map +1 -0
  14. package/dist/resources/__tests__/ucp.test.d.ts +2 -0
  15. package/dist/resources/__tests__/ucp.test.d.ts.map +1 -0
  16. package/dist/resources/approval-policy.d.ts +9 -0
  17. package/dist/resources/approval-policy.d.ts.map +1 -0
  18. package/dist/resources/base.d.ts +1 -0
  19. package/dist/resources/base.d.ts.map +1 -1
  20. package/dist/resources/holder-jwk.d.ts +11 -0
  21. package/dist/resources/holder-jwk.d.ts.map +1 -0
  22. package/dist/resources/identity-credentials.d.ts +9 -0
  23. package/dist/resources/identity-credentials.d.ts.map +1 -0
  24. package/dist/resources/interfaces.d.ts +75 -8
  25. package/dist/resources/interfaces.d.ts.map +1 -1
  26. package/dist/resources/payment-methods.d.ts +3 -1
  27. package/dist/resources/payment-methods.d.ts.map +1 -1
  28. package/dist/resources/ucp.d.ts +25 -0
  29. package/dist/resources/ucp.d.ts.map +1 -0
  30. package/dist/resources/user-info.d.ts.map +1 -1
  31. package/dist/types/index.d.ts +132 -48
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/package.json +1 -1
  34. package/dist/resources/__tests__/summaries.test.d.ts +0 -2
  35. package/dist/resources/__tests__/summaries.test.d.ts.map +0 -1
  36. package/dist/resources/summaries.d.ts +0 -10
  37. package/dist/resources/summaries.d.ts.map +0 -1
package/README.md CHANGED
@@ -27,6 +27,12 @@ const link = new Link({ accessToken: process.env.LINK_ACCESS_TOKEN! });
27
27
  const paymentMethods = await link.paymentMethods.list();
28
28
  ```
29
29
 
30
+ Retrieve the approval policy for the current app and user:
31
+
32
+ ```ts
33
+ const approvalPolicy = await link.approvalPolicy.retrieve();
34
+ ```
35
+
30
36
  Use a fixed token for a short-lived job or when the caller replaces the entire
31
37
  client as credentials change.
32
38
 
@@ -170,7 +176,7 @@ try {
170
176
  - `spendRequests` — create, approve, retrieve, update, cancel, and list
171
177
  - `paymentMethods` — list Link payment methods
172
178
  - `shippingAddresses` — list shipping addresses
173
- - `userInfo` — retrieve Link user information
179
+ - `userInfo` — retrieve Link user information, including the stable `id` when returned by the API
174
180
  - `transactions` — list transactions
175
181
  - `sources` — list connected sources
176
182
  - `balances` — list balances
package/dist/client.d.ts CHANGED
@@ -1,17 +1,19 @@
1
1
  import type { LinkOptions } from '@/config';
2
- import type { IAttestationsResource, IBalancesResource, IPaymentMethodsResource, IReportResource, IShippingAddressResource, ISourcesResource, ISpendRequestResource, ISummariesResource, ITransactionsResource, IUserInfoResource, IWebBotAuthResource } from '@/resources/interfaces';
2
+ import type { IApprovalPolicyResource, IAttestationsResource, IBalancesResource, IIdentityCredentialsResource, IPaymentMethodsResource, IReportResource, IShippingAddressResource, ISourcesResource, ISpendRequestResource, ITransactionsResource, IUcpResource, IUserInfoResource, IWebBotAuthResource } from '@/resources/interfaces';
3
3
  export declare class Link {
4
4
  readonly attestations: IAttestationsResource;
5
+ readonly identityCredentials: IIdentityCredentialsResource;
5
6
  readonly spendRequests: ISpendRequestResource;
6
7
  readonly paymentMethods: IPaymentMethodsResource;
7
8
  readonly shippingAddresses: IShippingAddressResource;
8
9
  readonly userInfo: IUserInfoResource;
10
+ readonly approvalPolicy: IApprovalPolicyResource;
9
11
  readonly transactions: ITransactionsResource;
10
12
  readonly sources: ISourcesResource;
11
13
  readonly balances: IBalancesResource;
12
- readonly summaries: ISummariesResource;
13
14
  readonly webBotAuth: IWebBotAuthResource;
14
15
  readonly reports: IReportResource;
16
+ readonly ucp: IUcpResource;
15
17
  constructor(options: LinkOptions);
16
18
  }
17
19
  export default Link;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAWhC,qBAAa,IAAI;IACf,QAAQ,CAAC,YAAY,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,uBAAuB,CAAC;IACjD,QAAQ,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAElC,YAAY,OAAO,EAAE,WAAW,EAY/B;CACF;eAEc,IAAI"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAK5C,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,uBAAuB,EACvB,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAWhC,qBAAa,IAAI;IACf,QAAQ,CAAC,YAAY,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,mBAAmB,EAAE,4BAA4B,CAAC;IAC3D,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,uBAAuB,CAAC;IACjD,QAAQ,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,cAAc,EAAE,uBAAuB,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC;IAE3B,YAAY,OAAO,EAAE,WAAW,EAc/B;CACF;eAEc,IAAI"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  export { default, Link } from './client';
2
2
  export type { LinkOptions, LinkSdkLogger } from './config';
3
3
  export { LinkApiError, LinkConfigurationError, LinkResponseError, LinkSdkError, LinkTransportError, } from './errors';
4
+ export { ApprovalPolicyResource } from './resources/approval-policy';
4
5
  export * from './resources/attestations';
6
+ export { holderJwksEqual, holderJwkThumbprint, parseHolderPublicJwk, } from './resources/holder-jwk';
5
7
  export * from './resources/interfaces';
6
8
  export { getDuplicateSpendRequest } from './resources/spend-request';
7
- export * from './resources/summaries';
8
9
  export * from './types/index';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,cAAc,eAAe,CAAC"}