@paygentic/sdk 0.10.3 → 0.10.4

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 (95) hide show
  1. package/README.md +19 -62
  2. package/dist/commonjs/funcs/meGetMe.d.ts +18 -0
  3. package/dist/commonjs/funcs/meGetMe.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/meGetMe.js +108 -0
  5. package/dist/commonjs/funcs/meGetMe.js.map +1 -0
  6. package/dist/commonjs/lib/config.d.ts +2 -2
  7. package/dist/commonjs/lib/config.js +2 -2
  8. package/dist/commonjs/models/errors/error.d.ts +6 -0
  9. package/dist/commonjs/models/errors/error.d.ts.map +1 -1
  10. package/dist/commonjs/models/errors/error.js +3 -0
  11. package/dist/commonjs/models/errors/error.js.map +1 -1
  12. package/dist/commonjs/models/index.d.ts +3 -0
  13. package/dist/commonjs/models/index.d.ts.map +1 -1
  14. package/dist/commonjs/models/index.js +3 -0
  15. package/dist/commonjs/models/index.js.map +1 -1
  16. package/dist/commonjs/models/me.d.ts +34 -0
  17. package/dist/commonjs/models/me.d.ts.map +1 -0
  18. package/dist/commonjs/models/me.js +63 -0
  19. package/dist/commonjs/models/me.js.map +1 -0
  20. package/dist/commonjs/models/mecredential.d.ts +31 -0
  21. package/dist/commonjs/models/mecredential.d.ts.map +1 -0
  22. package/dist/commonjs/models/mecredential.js +60 -0
  23. package/dist/commonjs/models/mecredential.js.map +1 -0
  24. package/dist/commonjs/models/outstandingblock.d.ts +5 -1
  25. package/dist/commonjs/models/outstandingblock.d.ts.map +1 -1
  26. package/dist/commonjs/models/outstandingblock.js +1 -0
  27. package/dist/commonjs/models/outstandingblock.js.map +1 -1
  28. package/dist/commonjs/models/permission.d.ts +113 -0
  29. package/dist/commonjs/models/permission.d.ts.map +1 -0
  30. package/dist/commonjs/models/permission.js +148 -0
  31. package/dist/commonjs/models/permission.js.map +1 -0
  32. package/dist/commonjs/models/revenueaccountrow.d.ts +1 -1
  33. package/dist/commonjs/models/revenueaccounttotal.d.ts +1 -1
  34. package/dist/commonjs/sdk/me.d.ts +12 -0
  35. package/dist/commonjs/sdk/me.d.ts.map +1 -0
  36. package/dist/commonjs/sdk/me.js +22 -0
  37. package/dist/commonjs/sdk/me.js.map +1 -0
  38. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  39. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  40. package/dist/commonjs/sdk/sdk.js +4 -0
  41. package/dist/commonjs/sdk/sdk.js.map +1 -1
  42. package/dist/esm/funcs/meGetMe.d.ts +18 -0
  43. package/dist/esm/funcs/meGetMe.d.ts.map +1 -0
  44. package/dist/esm/funcs/meGetMe.js +72 -0
  45. package/dist/esm/funcs/meGetMe.js.map +1 -0
  46. package/dist/esm/lib/config.d.ts +2 -2
  47. package/dist/esm/lib/config.js +2 -2
  48. package/dist/esm/models/errors/error.d.ts +6 -0
  49. package/dist/esm/models/errors/error.d.ts.map +1 -1
  50. package/dist/esm/models/errors/error.js +3 -0
  51. package/dist/esm/models/errors/error.js.map +1 -1
  52. package/dist/esm/models/index.d.ts +3 -0
  53. package/dist/esm/models/index.d.ts.map +1 -1
  54. package/dist/esm/models/index.js +3 -0
  55. package/dist/esm/models/index.js.map +1 -1
  56. package/dist/esm/models/me.d.ts +34 -0
  57. package/dist/esm/models/me.d.ts.map +1 -0
  58. package/dist/esm/models/me.js +26 -0
  59. package/dist/esm/models/me.js.map +1 -0
  60. package/dist/esm/models/mecredential.d.ts +31 -0
  61. package/dist/esm/models/mecredential.d.ts.map +1 -0
  62. package/dist/esm/models/mecredential.js +23 -0
  63. package/dist/esm/models/mecredential.js.map +1 -0
  64. package/dist/esm/models/outstandingblock.d.ts +5 -1
  65. package/dist/esm/models/outstandingblock.d.ts.map +1 -1
  66. package/dist/esm/models/outstandingblock.js +1 -0
  67. package/dist/esm/models/outstandingblock.js.map +1 -1
  68. package/dist/esm/models/permission.d.ts +113 -0
  69. package/dist/esm/models/permission.d.ts.map +1 -0
  70. package/dist/esm/models/permission.js +112 -0
  71. package/dist/esm/models/permission.js.map +1 -0
  72. package/dist/esm/models/revenueaccountrow.d.ts +1 -1
  73. package/dist/esm/models/revenueaccounttotal.d.ts +1 -1
  74. package/dist/esm/sdk/me.d.ts +12 -0
  75. package/dist/esm/sdk/me.d.ts.map +1 -0
  76. package/dist/esm/sdk/me.js +18 -0
  77. package/dist/esm/sdk/me.js.map +1 -0
  78. package/dist/esm/sdk/sdk.d.ts +3 -0
  79. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  80. package/dist/esm/sdk/sdk.js +4 -0
  81. package/dist/esm/sdk/sdk.js.map +1 -1
  82. package/jsr.json +1 -1
  83. package/package.json +1 -1
  84. package/src/funcs/meGetMe.ts +151 -0
  85. package/src/lib/config.ts +2 -2
  86. package/src/models/errors/error.ts +6 -0
  87. package/src/models/index.ts +3 -0
  88. package/src/models/me.ts +60 -0
  89. package/src/models/mecredential.ts +58 -0
  90. package/src/models/outstandingblock.ts +6 -1
  91. package/src/models/permission.ts +119 -0
  92. package/src/models/revenueaccountrow.ts +1 -1
  93. package/src/models/revenueaccounttotal.ts +1 -1
  94. package/src/sdk/me.ts +25 -0
  95. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { meGetMe } from "../funcs/meGetMe.js";
5
+ import { ClientSDK } from "../lib/sdks.js";
6
+ import { unwrapAsync } from "../types/fp.js";
7
+ export class Me extends ClientSDK {
8
+ /**
9
+ * Get the caller
10
+ *
11
+ * @remarks
12
+ * Returns the caller's identity in its active organization, its roles, and the permissions that its credential holds there. The permissions are the effective set for the credential of the call: for a session or an API key, those of the principal; for an OAuth token, those of the principal narrowed to the scopes of the token.
13
+ */
14
+ async getMe(options) {
15
+ return unwrapAsync(meGetMe(this, options));
16
+ }
17
+ }
18
+ //# sourceMappingURL=me.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"me.js","sourceRoot":"","sources":["../../../src/sdk/me.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,EAAG,SAAQ,SAAS;IAC/B;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CACT,OAAwB;QAExB,OAAO,WAAW,CAAC,OAAO,CACxB,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -11,6 +11,7 @@ import { Features } from "./features.js";
11
11
  import { Fees } from "./fees.js";
12
12
  import { InvoicesV2 } from "./invoicesv2.js";
13
13
  import { Items } from "./items.js";
14
+ import { Me } from "./me.js";
14
15
  import { MerchantIntegrations } from "./merchantintegrations.js";
15
16
  import { Merchants } from "./merchants.js";
16
17
  import { Orders } from "./orders.js";
@@ -28,6 +29,8 @@ import { TestClocks } from "./testclocks.js";
28
29
  import { Users } from "./users.js";
29
30
  import { Webhooks } from "./webhooks.js";
30
31
  export declare class Paygentic extends ClientSDK {
32
+ private _me?;
33
+ get me(): Me;
31
34
  private _billableMetrics?;
32
35
  get billableMetrics(): BillableMetrics;
33
36
  private _customers?;
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CA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Q,CAAC,CAAU;IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;IAED,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED,OAAO,CAAC,UAAU,CAAC,CAAY;IAC/B,IAAI,SAAS,IAAI,SAAS,CAEzB;IAED,OAAO,CAAC,mBAAmB,CAAC,CAAqB;IACjD,IAAI,kBAAkB,IAAI,kBAAkB,CAE3C;IAED,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,iBAAiB,CAAC,CAAmB;IAC7C,IAAI,gBAAgB,IAAI,gBAAgB,CAEvC;IAED,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED,OAAO,CAAC,qBAAqB,CAAC,CAAuB;IACrD,IAAI,oBAAoB,IAAI,oBAAoB,CAI/C;IAED,OAAO,CAAC,UAAU,CAAC,CAAY;IAC/B,IAAI,SAAS,IAAI,SAAS,CAEzB;IAED,OAAO,CAAC,SAAS,CAAC,CAAW;IAC7B,IAAI,QAAQ,IAAI,QAAQ,CAEvB;CACF"}
@@ -14,6 +14,7 @@ import { Features } from "./features.js";
14
14
  import { Fees } from "./fees.js";
15
15
  import { InvoicesV2 } from "./invoicesv2.js";
16
16
  import { Items } from "./items.js";
17
+ import { Me } from "./me.js";
17
18
  import { MerchantIntegrations } from "./merchantintegrations.js";
18
19
  import { Merchants } from "./merchants.js";
19
20
  import { Orders } from "./orders.js";
@@ -31,6 +32,9 @@ import { TestClocks } from "./testclocks.js";
31
32
  import { Users } from "./users.js";
32
33
  import { Webhooks } from "./webhooks.js";
33
34
  export class Paygentic extends ClientSDK {
35
+ get me() {
36
+ return (this._me ?? (this._me = new Me(this._options)));
37
+ }
34
38
  get billableMetrics() {
35
39
  return (this._billableMetrics ?? (this._billableMetrics = new BillableMetrics(this._options)));
36
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAA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AI,CAAC,MAAM,GAAK,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpD,CAAC;IAGD,IAAI,MAAM;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtD,CAAC;IAGD,IAAI,gBAAgB;QAClB,OAAO,CAAC,IAAI,CAAC,iBAAiB,KAAtB,IAAI,CAAC,iBAAiB,GAAK,IAAI,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1E,CAAC;IAGD,IAAI,UAAU;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,KAAhB,IAAI,CAAC,WAAW,GAAK,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC9D,CAAC;IAGD,IAAI,oBAAoB;QACtB,OAAO,CAAC,IAAI,CAAC,qBAAqB,KAA1B,IAAI,CAAC,qBAAqB,GAAK,IAAI,oBAAoB,CAC7D,IAAI,CAAC,QAAQ,CACd,EAAC,CAAC;IACL,CAAC;IAGD,IAAI,SAAS;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,KAAf,IAAI,CAAC,UAAU,GAAK,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5D,CAAC;IAGD,IAAI,QAAQ;QACV,OAAO,CAAC,IAAI,CAAC,SAAS,KAAd,IAAI,CAAC,SAAS,GAAK,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1D,CAAC;CACF"}
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@paygentic/sdk",
5
- "version": "0.10.3",
5
+ "version": "0.10.4",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paygentic/sdk",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "author": "Speakeasy",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -0,0 +1,151 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { PaygenticCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { RequestOptions } from "../lib/sdks.js";
9
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
+ import { pathToFunc } from "../lib/url.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import * as errors from "../models/errors/index.js";
19
+ import { PaygenticError } from "../models/errors/paygenticerror.js";
20
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as models from "../models/index.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Get the caller
28
+ *
29
+ * @remarks
30
+ * Returns the caller's identity in its active organization, its roles, and the permissions that its credential holds there. The permissions are the effective set for the credential of the call: for a session or an API key, those of the principal; for an OAuth token, those of the principal narrowed to the scopes of the token.
31
+ */
32
+ export function meGetMe(
33
+ client: PaygenticCore,
34
+ options?: RequestOptions,
35
+ ): APIPromise<
36
+ Result<
37
+ models.Me,
38
+ | errors.ErrorT
39
+ | PaygenticError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ options,
52
+ ));
53
+ }
54
+
55
+ async function $do(
56
+ client: PaygenticCore,
57
+ options?: RequestOptions,
58
+ ): Promise<
59
+ [
60
+ Result<
61
+ models.Me,
62
+ | errors.ErrorT
63
+ | PaygenticError
64
+ | ResponseValidationError
65
+ | ConnectionError
66
+ | RequestAbortedError
67
+ | RequestTimeoutError
68
+ | InvalidRequestError
69
+ | UnexpectedClientError
70
+ | SDKValidationError
71
+ >,
72
+ APICall,
73
+ ]
74
+ > {
75
+ const path = pathToFunc("/v0/me")();
76
+
77
+ const headers = new Headers(compactMap({
78
+ Accept: "application/json",
79
+ }));
80
+
81
+ const secConfig = await extractSecurity(client._options.bearerAuth);
82
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
83
+ const requestSecurity = resolveGlobalSecurity(securityInput);
84
+
85
+ const context = {
86
+ options: client._options,
87
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
88
+ operationID: "getMe",
89
+ oAuth2Scopes: null,
90
+
91
+ resolvedSecurity: requestSecurity,
92
+
93
+ securitySource: client._options.bearerAuth,
94
+ retryConfig: options?.retries
95
+ || client._options.retryConfig
96
+ || { strategy: "none" },
97
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
98
+ };
99
+
100
+ const requestRes = client._createRequest(context, {
101
+ security: requestSecurity,
102
+ method: "GET",
103
+ baseURL: options?.serverURL,
104
+ path: path,
105
+ headers: headers,
106
+ userAgent: client._options.userAgent,
107
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
108
+ }, options);
109
+ if (!requestRes.ok) {
110
+ return [requestRes, { status: "invalid" }];
111
+ }
112
+ const req = requestRes.value;
113
+
114
+ const doResult = await client._do(req, {
115
+ context,
116
+ errorCodes: ["401", "403", "4XX", "5XX"],
117
+ retryConfig: context.retryConfig,
118
+ retryCodes: context.retryCodes,
119
+ });
120
+ if (!doResult.ok) {
121
+ return [doResult, { status: "request-error", request: req }];
122
+ }
123
+ const response = doResult.value;
124
+
125
+ const responseFields = {
126
+ HttpMeta: { Response: response, Request: req },
127
+ };
128
+
129
+ const [result] = await M.match<
130
+ models.Me,
131
+ | errors.ErrorT
132
+ | PaygenticError
133
+ | ResponseValidationError
134
+ | ConnectionError
135
+ | RequestAbortedError
136
+ | RequestTimeoutError
137
+ | InvalidRequestError
138
+ | UnexpectedClientError
139
+ | SDKValidationError
140
+ >(
141
+ M.json(200, models.Me$inboundSchema),
142
+ M.jsonErr([401, 403], errors.ErrorT$inboundSchema),
143
+ M.fail("4XX"),
144
+ M.fail("5XX"),
145
+ )(response, req, { extraFields: responseFields });
146
+ if (!result.ok) {
147
+ return [result, { status: "complete", request: req, response }];
148
+ }
149
+
150
+ return [result, { status: "complete", request: req, response }];
151
+ }
package/src/lib/config.ts CHANGED
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "0.1.0",
68
- sdkVersion: "0.10.3",
68
+ sdkVersion: "0.10.4",
69
69
  genVersion: "2.879.13",
70
- userAgent: "speakeasy-sdk/typescript 0.10.3 2.879.13 0.1.0 @paygentic/sdk",
70
+ userAgent: "speakeasy-sdk/typescript 0.10.4 2.879.13 0.1.0 @paygentic/sdk",
71
71
  } as const;
@@ -6,6 +6,9 @@ import * as z from "zod/v3";
6
6
  import * as models from "../index.js";
7
7
  import { PaygenticError } from "./paygenticerror.js";
8
8
 
9
+ /**
10
+ * Unauthorized - Authentication failed or user does not have permissions
11
+ */
9
12
  export type ErrorTData = {
10
13
  /**
11
14
  * Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.
@@ -33,6 +36,9 @@ export type ErrorTData = {
33
36
  requiredPermissions?: Array<string> | undefined;
34
37
  };
35
38
 
39
+ /**
40
+ * Unauthorized - Authentication failed or user does not have permissions
41
+ */
36
42
  export class ErrorT extends PaygenticError {
37
43
  /**
38
44
  * Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.
@@ -80,6 +80,8 @@ export * from "./lineitemsresponse.js";
80
80
  export * from "./lineitemssummary.js";
81
81
  export * from "./lineprovenance.js";
82
82
  export * from "./mappingcapabilities.js";
83
+ export * from "./me.js";
84
+ export * from "./mecredential.js";
83
85
  export * from "./merchantintegration.js";
84
86
  export * from "./merchantintegrationprovider.js";
85
87
  export * from "./merchantintegrationstatus.js";
@@ -105,6 +107,7 @@ export * from "./payment.js";
105
107
  export * from "./paymentmethod.js";
106
108
  export * from "./paymentsession.js";
107
109
  export * from "./paymentsummary.js";
110
+ export * from "./permission.js";
108
111
  export * from "./plan.js";
109
112
  export * from "./plancreditallocation.js";
110
113
  export * from "./planlineinput.js";
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { ClosedEnum } from "../types/enums.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
+ import { MeCredential, MeCredential$inboundSchema } from "./mecredential.js";
11
+ import { Permission, Permission$inboundSchema } from "./permission.js";
12
+
13
+ export const OrganizationType = {
14
+ Merchant: "merchant",
15
+ Consumer: "consumer",
16
+ } as const;
17
+ export type OrganizationType = ClosedEnum<typeof OrganizationType>;
18
+
19
+ export type Me = {
20
+ userId: string;
21
+ organizationId: string;
22
+ organizationType: OrganizationType;
23
+ /**
24
+ * The role names of the caller in the active organization.
25
+ */
26
+ roles: Array<string>;
27
+ /**
28
+ * The permissions that the credential of the call holds in the active organization.
29
+ */
30
+ permissions: Array<Permission>;
31
+ /**
32
+ * The credential of the call. clientId is set for an OAuth token and apiKeyId for an API key.
33
+ */
34
+ credential: MeCredential;
35
+ };
36
+
37
+ /** @internal */
38
+ export const OrganizationType$inboundSchema: z.ZodNativeEnum<
39
+ typeof OrganizationType
40
+ > = z.nativeEnum(OrganizationType);
41
+
42
+ /** @internal */
43
+ export const Me$inboundSchema: z.ZodType<Me, z.ZodTypeDef, unknown> = z.object({
44
+ userId: z.string(),
45
+ organizationId: z.string(),
46
+ organizationType: OrganizationType$inboundSchema,
47
+ roles: z.array(z.string()),
48
+ permissions: z.array(Permission$inboundSchema),
49
+ credential: MeCredential$inboundSchema,
50
+ });
51
+
52
+ export function meFromJSON(
53
+ jsonString: string,
54
+ ): SafeParseResult<Me, SDKValidationError> {
55
+ return safeParse(
56
+ jsonString,
57
+ (x) => Me$inboundSchema.parse(JSON.parse(x)),
58
+ `Failed to parse 'Me' from JSON`,
59
+ );
60
+ }
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { ClosedEnum } from "../types/enums.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
+
11
+ export const MeCredentialType = {
12
+ Session: "session",
13
+ ApiKey: "apiKey",
14
+ Oauth: "oauth",
15
+ System: "system",
16
+ } as const;
17
+ export type MeCredentialType = ClosedEnum<typeof MeCredentialType>;
18
+
19
+ /**
20
+ * The credential of the call. clientId is set for an OAuth token and apiKeyId for an API key.
21
+ */
22
+ export type MeCredential = {
23
+ type: MeCredentialType;
24
+ /**
25
+ * The OAuth client of the token.
26
+ */
27
+ clientId?: string | undefined;
28
+ /**
29
+ * The API key of the call.
30
+ */
31
+ apiKeyId?: string | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const MeCredentialType$inboundSchema: z.ZodNativeEnum<
36
+ typeof MeCredentialType
37
+ > = z.nativeEnum(MeCredentialType);
38
+
39
+ /** @internal */
40
+ export const MeCredential$inboundSchema: z.ZodType<
41
+ MeCredential,
42
+ z.ZodTypeDef,
43
+ unknown
44
+ > = z.object({
45
+ type: MeCredentialType$inboundSchema,
46
+ clientId: z.string().optional(),
47
+ apiKeyId: z.string().optional(),
48
+ });
49
+
50
+ export function meCredentialFromJSON(
51
+ jsonString: string,
52
+ ): SafeParseResult<MeCredential, SDKValidationError> {
53
+ return safeParse(
54
+ jsonString,
55
+ (x) => MeCredential$inboundSchema.parse(JSON.parse(x)),
56
+ `Failed to parse 'MeCredential' from JSON`,
57
+ );
58
+ }
@@ -9,7 +9,7 @@ import { AccountFigure, AccountFigure$inboundSchema } from "./accountfigure.js";
9
9
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
10
 
11
11
  /**
12
- * What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount.
12
+ * What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount. `overdue` is a part of `awaitingPayment`.
13
13
  */
14
14
  export type OutstandingBlock = {
15
15
  /**
@@ -28,6 +28,10 @@ export type OutstandingBlock = {
28
28
  * The part with status `PAYMENT_FAILED`: collection has ended
29
29
  */
30
30
  paymentFailed: AccountFigure;
31
+ /**
32
+ * The invoices of `awaitingPayment` past their due date: status `ISSUED`, no card retry scheduled, and a due date before the start of today, UTC. Today is the subscription's test clock when test clocks are enabled. A subset of `awaitingPayment` by count. A credit invoice is never overdue, so the amount can exceed `awaitingPayment.amount`.
33
+ */
34
+ overdue: AccountFigure;
31
35
  };
32
36
 
33
37
  /** @internal */
@@ -40,6 +44,7 @@ export const OutstandingBlock$inboundSchema: z.ZodType<
40
44
  amount: z.string(),
41
45
  awaitingPayment: AccountFigure$inboundSchema,
42
46
  paymentFailed: AccountFigure$inboundSchema,
47
+ overdue: AccountFigure$inboundSchema,
43
48
  });
44
49
 
45
50
  export function outstandingBlockFromJSON(
@@ -0,0 +1,119 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ /**
9
+ * A permission of the catalog: a resource read or write, or a sensitive action.
10
+ */
11
+ export const Permission = {
12
+ OrganizationRead: "organization:read",
13
+ MembersRead: "members:read",
14
+ ProfileRead: "profile:read",
15
+ ApiKeysRead: "apiKeys:read",
16
+ MerchantsRead: "merchants:read",
17
+ ConsumersRead: "consumers:read",
18
+ CustomersRead: "customers:read",
19
+ PlansRead: "plans:read",
20
+ PricesRead: "prices:read",
21
+ ProductsRead: "products:read",
22
+ FeaturesRead: "features:read",
23
+ FeesRead: "fees:read",
24
+ BillableMetricsRead: "billableMetrics:read",
25
+ ItemsRead: "items:read",
26
+ PricingUnitsRead: "pricingUnits:read",
27
+ SubscriptionsRead: "subscriptions:read",
28
+ SubscriptionAdjustmentsRead: "subscriptionAdjustments:read",
29
+ DiscountsRead: "discounts:read",
30
+ GrantsRead: "grants:read",
31
+ EntitlementsRead: "entitlements:read",
32
+ CreditPoolsRead: "creditPools:read",
33
+ OrdersRead: "orders:read",
34
+ BillingSchedulesRead: "billingSchedules:read",
35
+ InvoicesRead: "invoices:read",
36
+ PaymentsRead: "payments:read",
37
+ PaymentSessionsRead: "paymentSessions:read",
38
+ PortalSessionsRead: "portalSessions:read",
39
+ PlatformUsersRead: "platformUsers:read",
40
+ PlatformAdminRead: "platformAdmin:read",
41
+ OrganizationCreationRead: "organizationCreation:read",
42
+ ComplianceRead: "compliance:read",
43
+ TaxSettingsRead: "taxSettings:read",
44
+ CostsRead: "costs:read",
45
+ PaymentAccountsRead: "paymentAccounts:read",
46
+ PayoutsRead: "payouts:read",
47
+ ExternalAccountsRead: "externalAccounts:read",
48
+ ExternalReferencesRead: "externalReferences:read",
49
+ MerchantIntegrationsRead: "merchantIntegrations:read",
50
+ WebhooksRead: "webhooks:read",
51
+ TestClocksRead: "testClocks:read",
52
+ ApprovalsRead: "approvals:read",
53
+ SourcesRead: "sources:read",
54
+ RevenueRead: "revenue:read",
55
+ OrganizationWrite: "organization:write",
56
+ MembersWrite: "members:write",
57
+ ProfileWrite: "profile:write",
58
+ ApiKeysWrite: "apiKeys:write",
59
+ MerchantsWrite: "merchants:write",
60
+ ConsumersWrite: "consumers:write",
61
+ CustomersWrite: "customers:write",
62
+ PlansWrite: "plans:write",
63
+ PricesWrite: "prices:write",
64
+ ProductsWrite: "products:write",
65
+ FeaturesWrite: "features:write",
66
+ FeesWrite: "fees:write",
67
+ BillableMetricsWrite: "billableMetrics:write",
68
+ ItemsWrite: "items:write",
69
+ PricingUnitsWrite: "pricingUnits:write",
70
+ SubscriptionsWrite: "subscriptions:write",
71
+ SubscriptionAdjustmentsWrite: "subscriptionAdjustments:write",
72
+ DiscountsWrite: "discounts:write",
73
+ GrantsWrite: "grants:write",
74
+ EntitlementsWrite: "entitlements:write",
75
+ CreditPoolsWrite: "creditPools:write",
76
+ OrdersWrite: "orders:write",
77
+ BillingSchedulesWrite: "billingSchedules:write",
78
+ InvoicesWrite: "invoices:write",
79
+ PaymentsWrite: "payments:write",
80
+ PaymentSessionsWrite: "paymentSessions:write",
81
+ PortalSessionsWrite: "portalSessions:write",
82
+ PlatformUsersWrite: "platformUsers:write",
83
+ PlatformAdminWrite: "platformAdmin:write",
84
+ OrganizationCreationWrite: "organizationCreation:write",
85
+ ComplianceWrite: "compliance:write",
86
+ TaxSettingsWrite: "taxSettings:write",
87
+ CostsWrite: "costs:write",
88
+ PaymentAccountsWrite: "paymentAccounts:write",
89
+ PayoutsWrite: "payouts:write",
90
+ ExternalAccountsWrite: "externalAccounts:write",
91
+ ExternalReferencesWrite: "externalReferences:write",
92
+ MerchantIntegrationsWrite: "merchantIntegrations:write",
93
+ WebhooksWrite: "webhooks:write",
94
+ TestClocksWrite: "testClocks:write",
95
+ ApprovalsWrite: "approvals:write",
96
+ SourcesWrite: "sources:write",
97
+ EventsWrite: "events:write",
98
+ InvoicesIssue: "invoices:issue",
99
+ InvoicesVoid: "invoices:void",
100
+ PaymentsRefund: "payments:refund",
101
+ OrganizationDelete: "organization:delete",
102
+ OwnershipTransfer: "ownership:transfer",
103
+ SubscriptionsTerminate: "subscriptions:terminate",
104
+ SubscriptionsTerminateWithReason: "subscriptions:terminateWithReason",
105
+ SubscriptionsReconcile: "subscriptions:reconcile",
106
+ SubscriptionsUpdate: "subscriptions:update",
107
+ SubscriptionsDelete: "subscriptions:delete",
108
+ SubscriptionsTaxExempt: "subscriptions:taxExempt",
109
+ SubscriptionsAutoApprove: "subscriptions:autoApprove",
110
+ OrganizationResetData: "organization:resetData",
111
+ } as const;
112
+ /**
113
+ * A permission of the catalog: a resource read or write, or a sensitive action.
114
+ */
115
+ export type Permission = ClosedEnum<typeof Permission>;
116
+
117
+ /** @internal */
118
+ export const Permission$inboundSchema: z.ZodNativeEnum<typeof Permission> = z
119
+ .nativeEnum(Permission);
@@ -25,7 +25,7 @@ export type RevenueAccountRow = {
25
25
  */
26
26
  currency: string;
27
27
  /**
28
- * What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount.
28
+ * What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount. `overdue` is a part of `awaitingPayment`.
29
29
  */
30
30
  outstanding: OutstandingBlock;
31
31
  };
@@ -17,7 +17,7 @@ export type RevenueAccountTotal = {
17
17
  */
18
18
  currency: string;
19
19
  /**
20
- * What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount.
20
+ * What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount. `overdue` is a part of `awaitingPayment`.
21
21
  */
22
22
  outstanding: OutstandingBlock;
23
23
  };
package/src/sdk/me.ts ADDED
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { meGetMe } from "../funcs/meGetMe.js";
6
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
+ import * as models from "../models/index.js";
8
+ import { unwrapAsync } from "../types/fp.js";
9
+
10
+ export class Me extends ClientSDK {
11
+ /**
12
+ * Get the caller
13
+ *
14
+ * @remarks
15
+ * Returns the caller's identity in its active organization, its roles, and the permissions that its credential holds there. The permissions are the effective set for the credential of the call: for a session or an API key, those of the principal; for an OAuth token, those of the principal narrowed to the scopes of the token.
16
+ */
17
+ async getMe(
18
+ options?: RequestOptions,
19
+ ): Promise<models.Me> {
20
+ return unwrapAsync(meGetMe(
21
+ this,
22
+ options,
23
+ ));
24
+ }
25
+ }
package/src/sdk/sdk.ts CHANGED
@@ -15,6 +15,7 @@ import { Features } from "./features.js";
15
15
  import { Fees } from "./fees.js";
16
16
  import { InvoicesV2 } from "./invoicesv2.js";
17
17
  import { Items } from "./items.js";
18
+ import { Me } from "./me.js";
18
19
  import { MerchantIntegrations } from "./merchantintegrations.js";
19
20
  import { Merchants } from "./merchants.js";
20
21
  import { Orders } from "./orders.js";
@@ -33,6 +34,11 @@ import { Users } from "./users.js";
33
34
  import { Webhooks } from "./webhooks.js";
34
35
 
35
36
  export class Paygentic extends ClientSDK {
37
+ private _me?: Me;
38
+ get me(): Me {
39
+ return (this._me ??= new Me(this._options));
40
+ }
41
+
36
42
  private _billableMetrics?: BillableMetrics;
37
43
  get billableMetrics(): BillableMetrics {
38
44
  return (this._billableMetrics ??= new BillableMetrics(this._options));