@parmana/sdk 1.1.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 (190) hide show
  1. package/README.md +284 -0
  2. package/dist/client/AuditApi.d.ts +18 -0
  3. package/dist/client/AuditApi.d.ts.map +1 -0
  4. package/dist/client/AuditApi.js +25 -0
  5. package/dist/client/AuditApi.js.map +1 -0
  6. package/dist/client/ExecutionApi.d.ts +39 -0
  7. package/dist/client/ExecutionApi.d.ts.map +1 -0
  8. package/dist/client/ExecutionApi.js +58 -0
  9. package/dist/client/ExecutionApi.js.map +1 -0
  10. package/dist/client/HealthApi.d.ts +22 -0
  11. package/dist/client/HealthApi.d.ts.map +1 -0
  12. package/dist/client/HealthApi.js +24 -0
  13. package/dist/client/HealthApi.js.map +1 -0
  14. package/dist/client/ParmanaClient.d.ts +154 -0
  15. package/dist/client/ParmanaClient.d.ts.map +1 -0
  16. package/dist/client/ParmanaClient.js +223 -0
  17. package/dist/client/ParmanaClient.js.map +1 -0
  18. package/dist/client/PolicyApi.d.ts +53 -0
  19. package/dist/client/PolicyApi.d.ts.map +1 -0
  20. package/dist/client/PolicyApi.js +48 -0
  21. package/dist/client/PolicyApi.js.map +1 -0
  22. package/dist/client/ReceiptApi.d.ts +29 -0
  23. package/dist/client/ReceiptApi.d.ts.map +1 -0
  24. package/dist/client/ReceiptApi.js +38 -0
  25. package/dist/client/ReceiptApi.js.map +1 -0
  26. package/dist/client/RefusalApi.d.ts +25 -0
  27. package/dist/client/RefusalApi.d.ts.map +1 -0
  28. package/dist/client/RefusalApi.js +38 -0
  29. package/dist/client/RefusalApi.js.map +1 -0
  30. package/dist/client/ReplayApi.d.ts +21 -0
  31. package/dist/client/ReplayApi.d.ts.map +1 -0
  32. package/dist/client/ReplayApi.js +30 -0
  33. package/dist/client/ReplayApi.js.map +1 -0
  34. package/dist/client/TransactionApi.d.ts +43 -0
  35. package/dist/client/TransactionApi.d.ts.map +1 -0
  36. package/dist/client/TransactionApi.js +62 -0
  37. package/dist/client/TransactionApi.js.map +1 -0
  38. package/dist/client/TrustRecordApi.d.ts +19 -0
  39. package/dist/client/TrustRecordApi.d.ts.map +1 -0
  40. package/dist/client/TrustRecordApi.js +25 -0
  41. package/dist/client/TrustRecordApi.js.map +1 -0
  42. package/dist/client/VerificationApi.d.ts +27 -0
  43. package/dist/client/VerificationApi.d.ts.map +1 -0
  44. package/dist/client/VerificationApi.js +42 -0
  45. package/dist/client/VerificationApi.js.map +1 -0
  46. package/dist/config/Configuration.d.ts +66 -0
  47. package/dist/config/Configuration.d.ts.map +1 -0
  48. package/dist/config/Configuration.js +17 -0
  49. package/dist/config/Configuration.js.map +1 -0
  50. package/dist/config/RetryPolicy.d.ts +66 -0
  51. package/dist/config/RetryPolicy.d.ts.map +1 -0
  52. package/dist/config/RetryPolicy.js +27 -0
  53. package/dist/config/RetryPolicy.js.map +1 -0
  54. package/dist/config/Transport.d.ts +80 -0
  55. package/dist/config/Transport.d.ts.map +1 -0
  56. package/dist/config/Transport.js +17 -0
  57. package/dist/config/Transport.js.map +1 -0
  58. package/dist/errors/AuthenticationError.d.ts +12 -0
  59. package/dist/errors/AuthenticationError.d.ts.map +1 -0
  60. package/dist/errors/AuthenticationError.js +21 -0
  61. package/dist/errors/AuthenticationError.js.map +1 -0
  62. package/dist/errors/AuthorizationError.d.ts +31 -0
  63. package/dist/errors/AuthorizationError.d.ts.map +1 -0
  64. package/dist/errors/AuthorizationError.js +42 -0
  65. package/dist/errors/AuthorizationError.js.map +1 -0
  66. package/dist/errors/ConfigurationError.d.ts +11 -0
  67. package/dist/errors/ConfigurationError.d.ts.map +1 -0
  68. package/dist/errors/ConfigurationError.js +20 -0
  69. package/dist/errors/ConfigurationError.js.map +1 -0
  70. package/dist/errors/ConflictError.d.ts +14 -0
  71. package/dist/errors/ConflictError.d.ts.map +1 -0
  72. package/dist/errors/ConflictError.js +23 -0
  73. package/dist/errors/ConflictError.js.map +1 -0
  74. package/dist/errors/ExecutionRejectedError.d.ts +11 -0
  75. package/dist/errors/ExecutionRejectedError.d.ts.map +1 -0
  76. package/dist/errors/ExecutionRejectedError.js +20 -0
  77. package/dist/errors/ExecutionRejectedError.js.map +1 -0
  78. package/dist/errors/InternalServerError.d.ts +11 -0
  79. package/dist/errors/InternalServerError.d.ts.map +1 -0
  80. package/dist/errors/InternalServerError.js +20 -0
  81. package/dist/errors/InternalServerError.js.map +1 -0
  82. package/dist/errors/NetworkError.d.ts +11 -0
  83. package/dist/errors/NetworkError.d.ts.map +1 -0
  84. package/dist/errors/NetworkError.js +20 -0
  85. package/dist/errors/NetworkError.js.map +1 -0
  86. package/dist/errors/NotFoundError.d.ts +13 -0
  87. package/dist/errors/NotFoundError.d.ts.map +1 -0
  88. package/dist/errors/NotFoundError.js +22 -0
  89. package/dist/errors/NotFoundError.js.map +1 -0
  90. package/dist/errors/ParmanaError.d.ts +57 -0
  91. package/dist/errors/ParmanaError.d.ts.map +1 -0
  92. package/dist/errors/ParmanaError.js +60 -0
  93. package/dist/errors/ParmanaError.js.map +1 -0
  94. package/dist/errors/RateLimitError.d.ts +24 -0
  95. package/dist/errors/RateLimitError.d.ts.map +1 -0
  96. package/dist/errors/RateLimitError.js +35 -0
  97. package/dist/errors/RateLimitError.js.map +1 -0
  98. package/dist/errors/ReplayError.d.ts +11 -0
  99. package/dist/errors/ReplayError.d.ts.map +1 -0
  100. package/dist/errors/ReplayError.js +20 -0
  101. package/dist/errors/ReplayError.js.map +1 -0
  102. package/dist/errors/TimeoutError.d.ts +11 -0
  103. package/dist/errors/TimeoutError.d.ts.map +1 -0
  104. package/dist/errors/TimeoutError.js +20 -0
  105. package/dist/errors/TimeoutError.js.map +1 -0
  106. package/dist/errors/ValidationError.d.ts +11 -0
  107. package/dist/errors/ValidationError.d.ts.map +1 -0
  108. package/dist/errors/ValidationError.js +20 -0
  109. package/dist/errors/ValidationError.js.map +1 -0
  110. package/dist/errors/VerificationError.d.ts +11 -0
  111. package/dist/errors/VerificationError.d.ts.map +1 -0
  112. package/dist/errors/VerificationError.js +20 -0
  113. package/dist/errors/VerificationError.js.map +1 -0
  114. package/dist/index.d.ts +41 -0
  115. package/dist/index.d.ts.map +1 -0
  116. package/dist/index.js +56 -0
  117. package/dist/index.js.map +1 -0
  118. package/dist/models/audit-event.d.ts +15 -0
  119. package/dist/models/audit-event.d.ts.map +1 -0
  120. package/dist/models/audit-event.js +2 -0
  121. package/dist/models/audit-event.js.map +1 -0
  122. package/dist/models/authority.d.ts +14 -0
  123. package/dist/models/authority.d.ts.map +1 -0
  124. package/dist/models/authority.js +8 -0
  125. package/dist/models/authority.js.map +1 -0
  126. package/dist/models/authorization.d.ts +13 -0
  127. package/dist/models/authorization.d.ts.map +1 -0
  128. package/dist/models/authorization.js +7 -0
  129. package/dist/models/authorization.js.map +1 -0
  130. package/dist/models/business-transaction.d.ts +25 -0
  131. package/dist/models/business-transaction.d.ts.map +1 -0
  132. package/dist/models/business-transaction.js +2 -0
  133. package/dist/models/business-transaction.js.map +1 -0
  134. package/dist/models/execution.d.ts +36 -0
  135. package/dist/models/execution.d.ts.map +1 -0
  136. package/dist/models/execution.js +2 -0
  137. package/dist/models/execution.js.map +1 -0
  138. package/dist/models/index.d.ts +15 -0
  139. package/dist/models/index.d.ts.map +1 -0
  140. package/dist/models/index.js +15 -0
  141. package/dist/models/index.js.map +1 -0
  142. package/dist/models/intent.d.ts +14 -0
  143. package/dist/models/intent.d.ts.map +1 -0
  144. package/dist/models/intent.js +7 -0
  145. package/dist/models/intent.js.map +1 -0
  146. package/dist/models/override.d.ts +9 -0
  147. package/dist/models/override.d.ts.map +1 -0
  148. package/dist/models/override.js +2 -0
  149. package/dist/models/override.js.map +1 -0
  150. package/dist/models/policy.d.ts +11 -0
  151. package/dist/models/policy.d.ts.map +1 -0
  152. package/dist/models/policy.js +7 -0
  153. package/dist/models/policy.js.map +1 -0
  154. package/dist/models/receipt.d.ts +10 -0
  155. package/dist/models/receipt.d.ts.map +1 -0
  156. package/dist/models/receipt.js +2 -0
  157. package/dist/models/receipt.js.map +1 -0
  158. package/dist/models/refusal-record.d.ts +51 -0
  159. package/dist/models/refusal-record.d.ts.map +1 -0
  160. package/dist/models/refusal-record.js +2 -0
  161. package/dist/models/refusal-record.js.map +1 -0
  162. package/dist/models/replay-result.d.ts +6 -0
  163. package/dist/models/replay-result.d.ts.map +1 -0
  164. package/dist/models/replay-result.js +2 -0
  165. package/dist/models/replay-result.js.map +1 -0
  166. package/dist/models/signature.d.ts +16 -0
  167. package/dist/models/signature.d.ts.map +1 -0
  168. package/dist/models/signature.js +10 -0
  169. package/dist/models/signature.js.map +1 -0
  170. package/dist/models/trust-record.d.ts +20 -0
  171. package/dist/models/trust-record.d.ts.map +1 -0
  172. package/dist/models/trust-record.js +2 -0
  173. package/dist/models/trust-record.js.map +1 -0
  174. package/dist/models/verification.d.ts +10 -0
  175. package/dist/models/verification.d.ts.map +1 -0
  176. package/dist/models/verification.js +2 -0
  177. package/dist/models/verification.js.map +1 -0
  178. package/dist/transport/HttpTransport.d.ts +25 -0
  179. package/dist/transport/HttpTransport.d.ts.map +1 -0
  180. package/dist/transport/HttpTransport.js +193 -0
  181. package/dist/transport/HttpTransport.js.map +1 -0
  182. package/dist/transport/mapHttpErrorResponse.d.ts +52 -0
  183. package/dist/transport/mapHttpErrorResponse.d.ts.map +1 -0
  184. package/dist/transport/mapHttpErrorResponse.js +134 -0
  185. package/dist/transport/mapHttpErrorResponse.js.map +1 -0
  186. package/dist/version.d.ts +7 -0
  187. package/dist/version.d.ts.map +1 -0
  188. package/dist/version.js +7 -0
  189. package/dist/version.js.map +1 -0
  190. package/package.json +57 -0
@@ -0,0 +1,223 @@
1
+ /**
2
+ * Parmana SDK
3
+ *
4
+ * Canonical SDK client.
5
+ *
6
+ * ParmanaClient is the primary entry point for interacting
7
+ * with the Parmana Runtime.
8
+ *
9
+ * Responsibilities:
10
+ * - Hold immutable SDK configuration.
11
+ * - Compose SDK APIs.
12
+ * - Delegate SDK operations.
13
+ *
14
+ * ParmanaClient does NOT:
15
+ * - evaluate policy
16
+ * - authorize execution
17
+ * - execute business logic
18
+ * - verify trust records
19
+ * - replay executions
20
+ * - communicate directly with the Runtime
21
+ */
22
+ import { ConfigurationError, } from "../errors/ConfigurationError.js";
23
+ import { HealthApi, } from "./HealthApi.js";
24
+ import { ExecutionApi, } from "./ExecutionApi.js";
25
+ import { VerificationApi, } from "./VerificationApi.js";
26
+ import { ReplayApi, } from "./ReplayApi.js";
27
+ import { ReceiptApi, } from "./ReceiptApi.js";
28
+ import { TransactionApi, } from "./TransactionApi.js";
29
+ import { TrustRecordApi, } from "./TrustRecordApi.js";
30
+ import { PolicyApi, } from "./PolicyApi.js";
31
+ import { RefusalApi, } from "./RefusalApi.js";
32
+ import { AuditApi, } from "./AuditApi.js";
33
+ /**
34
+ * Canonical Parmana SDK client.
35
+ */
36
+ export class ParmanaClient {
37
+ /**
38
+ * Immutable SDK configuration.
39
+ */
40
+ configuration;
41
+ /**
42
+ * Configured transport.
43
+ */
44
+ transport;
45
+ /**
46
+ * Runtime Health API.
47
+ */
48
+ healthApi;
49
+ /**
50
+ * Runtime Execution API.
51
+ */
52
+ executionApi;
53
+ /**
54
+ * Runtime Verification API.
55
+ */
56
+ verificationApi;
57
+ /**
58
+ * Runtime Replay API.
59
+ */
60
+ replayApi;
61
+ /**
62
+ * Runtime Receipt API.
63
+ */
64
+ receiptApi;
65
+ /**
66
+ * Runtime Transaction API.
67
+ */
68
+ transactionApi;
69
+ /**
70
+ * Runtime Trust Record API.
71
+ */
72
+ trustRecordApi;
73
+ /**
74
+ * Runtime Policy API.
75
+ */
76
+ policyApi;
77
+ /**
78
+ * Runtime Refusal Record API.
79
+ */
80
+ refusalApi;
81
+ /**
82
+ * Runtime Audit Event API.
83
+ */
84
+ auditApi;
85
+ /**
86
+ * Creates a Parmana SDK client.
87
+ */
88
+ constructor(configuration) {
89
+ if (!configuration.endpoint) {
90
+ throw new ConfigurationError("Runtime endpoint is required.");
91
+ }
92
+ if (!configuration.transport) {
93
+ throw new ConfigurationError("Transport is required.");
94
+ }
95
+ this.configuration = configuration;
96
+ this.transport = configuration.transport;
97
+ //
98
+ // Compose SDK APIs.
99
+ //
100
+ this.healthApi =
101
+ new HealthApi(this.transport);
102
+ this.executionApi =
103
+ new ExecutionApi(this.transport);
104
+ this.verificationApi =
105
+ new VerificationApi(this.transport);
106
+ this.replayApi =
107
+ new ReplayApi(this.transport);
108
+ this.receiptApi =
109
+ new ReceiptApi(this.transport);
110
+ this.transactionApi =
111
+ new TransactionApi(this.transport);
112
+ this.trustRecordApi =
113
+ new TrustRecordApi(this.transport);
114
+ this.policyApi =
115
+ new PolicyApi(this.transport);
116
+ this.refusalApi =
117
+ new RefusalApi(this.transport);
118
+ this.auditApi =
119
+ new AuditApi(this.transport);
120
+ }
121
+ /**
122
+ * Returns the configured Runtime endpoint.
123
+ */
124
+ endpoint() {
125
+ return this.configuration.endpoint;
126
+ }
127
+ /**
128
+ * Performs a Runtime health check.
129
+ */
130
+ health() {
131
+ return this.healthApi.health();
132
+ }
133
+ /**
134
+ * Returns the Runtime name, version, and API version.
135
+ */
136
+ version() {
137
+ return this.executionApi.version();
138
+ }
139
+ /**
140
+ * Executes a Business Transaction.
141
+ */
142
+ execute(transaction) {
143
+ return this.executionApi.execute(transaction);
144
+ }
145
+ /**
146
+ * Runs a fresh verification of an Execution Trust Record, appending a
147
+ * new Verification to its history. Distinct from
148
+ * getLatestVerification(), which reads the most recent one without
149
+ * re-verifying.
150
+ */
151
+ verify(businessTransactionId) {
152
+ return this.verificationApi.verify(businessTransactionId);
153
+ }
154
+ /**
155
+ * Returns the latest Verification.
156
+ */
157
+ getLatestVerification(businessTransactionId) {
158
+ return this.verificationApi.getLatest(businessTransactionId);
159
+ }
160
+ /**
161
+ * Performs deterministic replay.
162
+ */
163
+ replay(businessTransactionId) {
164
+ return this.replayApi.replay(businessTransactionId);
165
+ }
166
+ /**
167
+ * Generates an execution receipt.
168
+ */
169
+ receipt(businessTransactionId) {
170
+ return this.receiptApi.generate(businessTransactionId);
171
+ }
172
+ /**
173
+ * Creates (executes) a Business Transaction via POST /transactions,
174
+ * a second, independent entry point into the identical execution
175
+ * pipeline as execute() (POST /execute). See TransactionApi.create.
176
+ */
177
+ createTransaction(transaction) {
178
+ return this.transactionApi.create(transaction);
179
+ }
180
+ /**
181
+ * Retrieves a Business Transaction.
182
+ */
183
+ transaction(businessTransactionId) {
184
+ return this.transactionApi.get(businessTransactionId);
185
+ }
186
+ /**
187
+ * Lists Business Transactions.
188
+ */
189
+ transactions(page = 1, pageSize = 25) {
190
+ return this.transactionApi.list(page, pageSize);
191
+ }
192
+ /**
193
+ * Retrieves an Execution Trust Record.
194
+ */
195
+ trustRecord(businessTransactionId) {
196
+ return this.trustRecordApi.get(businessTransactionId);
197
+ }
198
+ /**
199
+ * Validates a policy definition.
200
+ */
201
+ validatePolicy(policy) {
202
+ return this.policyApi.validate(policy);
203
+ }
204
+ /**
205
+ * Retrieves a Refusal Record by Business Transaction ID.
206
+ */
207
+ refusalRecord(businessTransactionId) {
208
+ return this.refusalApi.get(businessTransactionId);
209
+ }
210
+ /**
211
+ * Verifies a Refusal Record's signature.
212
+ */
213
+ verifyRefusalRecord(record) {
214
+ return this.refusalApi.verify(record);
215
+ }
216
+ /**
217
+ * Verifies a signed caller-authentication audit event's signature.
218
+ */
219
+ verifyAuditEvent(event, signature) {
220
+ return this.auditApi.verify(event, signature);
221
+ }
222
+ }
223
+ //# sourceMappingURL=ParmanaClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParmanaClient.js","sourceRoot":"","sources":["../../src/client/ParmanaClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AA4BH,OAAO,EACL,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,SAAS,GAEV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,YAAY,GACb,MAAM,mBAAmB,CAAC;AAE3B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M,CAC3B,MAAM,CACP,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,gBAAgB,CACrB,KAAiB,EACjB,SAAoB;QAEpB,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CACzB,KAAK,EACL,SAAS,CACV,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Parmana SDK
3
+ *
4
+ * Policy API.
5
+ *
6
+ * Provides access to policy-related Runtime APIs.
7
+ *
8
+ * Responsibilities:
9
+ * - Validate policies.
10
+ * - Retrieve policy information.
11
+ *
12
+ * This API does NOT:
13
+ * - execute transactions
14
+ * - authorize execution
15
+ * - verify trust records
16
+ * - replay executions
17
+ */
18
+ import type { Policy } from "@parmana/policy";
19
+ import type { Transport } from "../config/Transport.js";
20
+ /**
21
+ * Canonical policy validation result.
22
+ */
23
+ export interface PolicyValidationResult {
24
+ /**
25
+ * Indicates whether the policy is valid.
26
+ */
27
+ readonly valid: boolean;
28
+ /**
29
+ * Validation errors.
30
+ */
31
+ readonly errors: readonly string[];
32
+ }
33
+ /**
34
+ * Policy API.
35
+ */
36
+ export declare class PolicyApi {
37
+ private readonly transport;
38
+ constructor(transport: Transport);
39
+ /**
40
+ * Validates a policy.
41
+ *
42
+ * POST /policies/validate does not use the shared {error, code?}
43
+ * envelope for 400 or 404: both are {valid, errors}, its own shape,
44
+ * the caller's answer, not an SDK-level failure — so those two
45
+ * statuses are exempted from the default throw-on-error behavior. 401
46
+ * is not exempted: it is generated by caller-auth middleware before
47
+ * this route's own handler ever runs, and does use the shared
48
+ * envelope, identically to every other route. See
49
+ * /api-reference/error-handling.
50
+ */
51
+ validate(policy: Policy): Promise<PolicyValidationResult>;
52
+ }
53
+ //# sourceMappingURL=PolicyApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolicyApi.d.ts","sourceRoot":"","sources":["../../src/client/PolicyApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,MAAM,EACP,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,qBAAa,SAAS;IAElB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAGvC;;;;;;;;;;;OAWG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,sBAAsB,CAAC;CAcnC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Parmana SDK
3
+ *
4
+ * Policy API.
5
+ *
6
+ * Provides access to policy-related Runtime APIs.
7
+ *
8
+ * Responsibilities:
9
+ * - Validate policies.
10
+ * - Retrieve policy information.
11
+ *
12
+ * This API does NOT:
13
+ * - execute transactions
14
+ * - authorize execution
15
+ * - verify trust records
16
+ * - replay executions
17
+ */
18
+ /**
19
+ * Policy API.
20
+ */
21
+ export class PolicyApi {
22
+ transport;
23
+ constructor(transport) {
24
+ this.transport = transport;
25
+ }
26
+ /**
27
+ * Validates a policy.
28
+ *
29
+ * POST /policies/validate does not use the shared {error, code?}
30
+ * envelope for 400 or 404: both are {valid, errors}, its own shape,
31
+ * the caller's answer, not an SDK-level failure — so those two
32
+ * statuses are exempted from the default throw-on-error behavior. 401
33
+ * is not exempted: it is generated by caller-auth middleware before
34
+ * this route's own handler ever runs, and does use the shared
35
+ * envelope, identically to every other route. See
36
+ * /api-reference/error-handling.
37
+ */
38
+ async validate(policy) {
39
+ const response = await this.transport.send({
40
+ path: "/policies/validate",
41
+ method: "POST",
42
+ body: policy,
43
+ nonThrowingStatuses: [400, 404],
44
+ });
45
+ return response.body;
46
+ }
47
+ }
48
+ //# sourceMappingURL=PolicyApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolicyApi.js","sourceRoot":"","sources":["../../src/client/PolicyApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAyBH;;GAEG;AACH,MAAM,OAAO,SAAS;IAED;IADnB,YACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAEJ;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,QAAQ,CACnB,MAAc;QAEd,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAyB;YAChD,IAAI,EAAE,oBAAoB;YAE1B,MAAM,EAAE,MAAM;YAEd,IAAI,EAAE,MAAM;YAEZ,mBAAmB,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;SAChC,CAAC,CAAC;QAEL,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Parmana Receipt API.
3
+ *
4
+ * Generate cryptographic execution receipts.
5
+ */
6
+ import type { Receipt } from "../models/index.js";
7
+ import type { Transport } from "../config/Transport.js";
8
+ /**
9
+ * Receipt API.
10
+ *
11
+ * Responsibilities
12
+ * ----------------
13
+ * - Generate execution receipts
14
+ *
15
+ * This API does NOT:
16
+ * - execute Business Transactions
17
+ * - replay executions
18
+ * - verify trust records
19
+ * - validate policies
20
+ */
21
+ export declare class ReceiptApi {
22
+ private readonly transport;
23
+ constructor(transport: Transport);
24
+ /**
25
+ * Generate an execution receipt.
26
+ */
27
+ generate(businessTransactionId: string): Promise<Receipt>;
28
+ }
29
+ //# sourceMappingURL=ReceiptApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReceiptApi.d.ts","sourceRoot":"","sources":["../../src/client/ReceiptApi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,OAAO,EACR,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;GAYG;AACH,qBAAa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAGvC;;OAEG;IACU,QAAQ,CACnB,qBAAqB,EAAE,MAAM,GAC5B,OAAO,CAAC,OAAO,CAAC;CAYpB"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Parmana Receipt API.
3
+ *
4
+ * Generate cryptographic execution receipts.
5
+ */
6
+ /**
7
+ * Receipt API.
8
+ *
9
+ * Responsibilities
10
+ * ----------------
11
+ * - Generate execution receipts
12
+ *
13
+ * This API does NOT:
14
+ * - execute Business Transactions
15
+ * - replay executions
16
+ * - verify trust records
17
+ * - validate policies
18
+ */
19
+ export class ReceiptApi {
20
+ transport;
21
+ constructor(transport) {
22
+ this.transport = transport;
23
+ }
24
+ /**
25
+ * Generate an execution receipt.
26
+ */
27
+ async generate(businessTransactionId) {
28
+ const response = await this.transport.send({
29
+ method: "POST",
30
+ path: "/receipt",
31
+ body: {
32
+ businessTransactionId,
33
+ },
34
+ });
35
+ return response.body;
36
+ }
37
+ }
38
+ //# sourceMappingURL=ReceiptApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReceiptApi.js","sourceRoot":"","sources":["../../src/client/ReceiptApi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,UAAU;IAEF;IADnB,YACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAEJ;;OAEG;IACI,KAAK,CAAC,QAAQ,CACnB,qBAA6B;QAE7B,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAU;YACjC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE;gBACJ,qBAAqB;aACtB;SACF,CAAC,CAAC;QAEL,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Parmana Refusal Record API (RFC-0021).
3
+ */
4
+ import type { RefusalRecord } from "../models/index.js";
5
+ import type { Transport } from "../config/Transport.js";
6
+ export declare class RefusalApi {
7
+ private readonly transport;
8
+ constructor(transport: Transport);
9
+ /**
10
+ * Verifies a Refusal Record's signature. Maps to POST
11
+ * /refusal/verify -- takes the record itself, not a lookup by id.
12
+ * No caller authentication is required by this route: it is the
13
+ * capability that makes a refusal independently third-party
14
+ * verifiable (RFC-0021).
15
+ */
16
+ verify(record: RefusalRecord): Promise<boolean>;
17
+ /**
18
+ * Retrieves a Refusal Record by Business Transaction ID. Maps to
19
+ * GET /refusal/:businessTransactionId. Unlike verify() above, this
20
+ * route is behind caller-auth and ownership scoping, identically to
21
+ * TrustRecordApi.get().
22
+ */
23
+ get(businessTransactionId: string): Promise<RefusalRecord>;
24
+ }
25
+ //# sourceMappingURL=RefusalApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefusalApi.d.ts","sourceRoot":"","sources":["../../src/client/RefusalApi.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAGvC;;;;;;OAMG;IACU,MAAM,CACjB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,OAAO,CAAC;IAWnB;;;;;OAKG;IACU,GAAG,CACd,qBAAqB,EAAE,MAAM,GAC5B,OAAO,CAAC,aAAa,CAAC;CAS1B"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Parmana Refusal Record API (RFC-0021).
3
+ */
4
+ export class RefusalApi {
5
+ transport;
6
+ constructor(transport) {
7
+ this.transport = transport;
8
+ }
9
+ /**
10
+ * Verifies a Refusal Record's signature. Maps to POST
11
+ * /refusal/verify -- takes the record itself, not a lookup by id.
12
+ * No caller authentication is required by this route: it is the
13
+ * capability that makes a refusal independently third-party
14
+ * verifiable (RFC-0021).
15
+ */
16
+ async verify(record) {
17
+ const response = await this.transport.send({
18
+ method: "POST",
19
+ path: "/refusal/verify",
20
+ body: record,
21
+ });
22
+ return response.body.valid;
23
+ }
24
+ /**
25
+ * Retrieves a Refusal Record by Business Transaction ID. Maps to
26
+ * GET /refusal/:businessTransactionId. Unlike verify() above, this
27
+ * route is behind caller-auth and ownership scoping, identically to
28
+ * TrustRecordApi.get().
29
+ */
30
+ async get(businessTransactionId) {
31
+ const response = await this.transport.send({
32
+ method: "GET",
33
+ path: `/refusal/${businessTransactionId}`,
34
+ });
35
+ return response.body;
36
+ }
37
+ }
38
+ //# sourceMappingURL=RefusalApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefusalApi.js","sourceRoot":"","sources":["../../src/client/RefusalApi.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,MAAM,OAAO,UAAU;IAEF;IADnB,YACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAEJ;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,MAAqB;QAErB,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAqB;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;QAEL,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,GAAG,CACd,qBAA6B;QAE7B,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAgB;YACvC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,YAAY,qBAAqB,EAAE;SAC1C,CAAC,CAAC;QAEL,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Parmana TypeScript SDK
3
+ *
4
+ * Replay API.
5
+ *
6
+ * Replay Business Transactions.
7
+ */
8
+ import type { Transport } from "../config/Transport.js";
9
+ import type { ReplayResult } from "../models/replay-result.js";
10
+ /**
11
+ * Replay API.
12
+ */
13
+ export declare class ReplayApi {
14
+ private readonly transport;
15
+ constructor(transport: Transport);
16
+ /**
17
+ * Replay a Business Transaction.
18
+ */
19
+ replay(businessTransactionId: string): Promise<ReplayResult>;
20
+ }
21
+ //# sourceMappingURL=ReplayApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReplayApi.d.ts","sourceRoot":"","sources":["../../src/client/ReplayApi.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,YAAY,EACb,MAAM,4BAA4B,CAAC;AAEpC;;GAEG;AACH,qBAAa,SAAS;IAElB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAGvC;;OAEG;IACU,MAAM,CACjB,qBAAqB,EAAE,MAAM,GAC5B,OAAO,CAAC,YAAY,CAAC;CAYzB"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Parmana TypeScript SDK
3
+ *
4
+ * Replay API.
5
+ *
6
+ * Replay Business Transactions.
7
+ */
8
+ /**
9
+ * Replay API.
10
+ */
11
+ export class ReplayApi {
12
+ transport;
13
+ constructor(transport) {
14
+ this.transport = transport;
15
+ }
16
+ /**
17
+ * Replay a Business Transaction.
18
+ */
19
+ async replay(businessTransactionId) {
20
+ const response = await this.transport.send({
21
+ method: "POST",
22
+ path: "/replay",
23
+ body: {
24
+ businessTransactionId,
25
+ },
26
+ });
27
+ return response.body;
28
+ }
29
+ }
30
+ //# sourceMappingURL=ReplayApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReplayApi.js","sourceRoot":"","sources":["../../src/client/ReplayApi.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH;;GAEG;AACH,MAAM,OAAO,SAAS;IAED;IADnB,YACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAEJ;;OAEG;IACI,KAAK,CAAC,MAAM,CACjB,qBAA6B;QAE7B,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAe;YACtC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,SAAS;YACf,IAAI,EAAE;gBACJ,qBAAqB;aACtB;SACF,CAAC,CAAC;QAEL,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Parmana Transaction API.
3
+ *
4
+ * Retrieve Business Transactions.
5
+ */
6
+ import type { BusinessTransaction, ExecutionTrustRecord } from "../models/index.js";
7
+ import type { Transport } from "../config/Transport.js";
8
+ /**
9
+ * Transaction API.
10
+ *
11
+ * Responsibilities
12
+ * ----------------
13
+ * - Create (execute) a Business Transaction via POST /transactions
14
+ * - Retrieve Business Transactions
15
+ * - List Business Transactions
16
+ *
17
+ * This API does NOT:
18
+ * - verify trust records
19
+ * - replay executions
20
+ * - generate receipts
21
+ */
22
+ export declare class TransactionApi {
23
+ private readonly transport;
24
+ constructor(transport: Transport);
25
+ /**
26
+ * Create (execute) a Business Transaction. Maps to POST
27
+ * /transactions: a second, independent entry point into the
28
+ * identical application.execute() pipeline as ExecutionApi.execute()
29
+ * (POST /execute). The only behavioral difference is the success
30
+ * status code, 201 instead of 200; the response body shape is
31
+ * otherwise identical.
32
+ */
33
+ create(transaction: BusinessTransaction): Promise<ExecutionTrustRecord>;
34
+ /**
35
+ * Retrieve a Business Transaction.
36
+ */
37
+ get(businessTransactionId: string): Promise<BusinessTransaction>;
38
+ /**
39
+ * List Business Transactions.
40
+ */
41
+ list(page?: number, pageSize?: number): Promise<BusinessTransaction[]>;
42
+ }
43
+ //# sourceMappingURL=TransactionApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionApi.d.ts","sourceRoot":"","sources":["../../src/client/TransactionApi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAGvC;;;;;;;OAOG;IACU,MAAM,CACjB,WAAW,EAAE,mBAAmB,GAC/B,OAAO,CAAC,oBAAoB,CAAC;IAWhC;;OAEG;IACU,GAAG,CACd,qBAAqB,EAAE,MAAM,GAC5B,OAAO,CAAC,mBAAmB,CAAC;IAU/B;;OAEG;IACU,IAAI,CACf,IAAI,SAAI,EACR,QAAQ,SAAK,GACZ,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAUlC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Parmana Transaction API.
3
+ *
4
+ * Retrieve Business Transactions.
5
+ */
6
+ /**
7
+ * Transaction API.
8
+ *
9
+ * Responsibilities
10
+ * ----------------
11
+ * - Create (execute) a Business Transaction via POST /transactions
12
+ * - Retrieve Business Transactions
13
+ * - List Business Transactions
14
+ *
15
+ * This API does NOT:
16
+ * - verify trust records
17
+ * - replay executions
18
+ * - generate receipts
19
+ */
20
+ export class TransactionApi {
21
+ transport;
22
+ constructor(transport) {
23
+ this.transport = transport;
24
+ }
25
+ /**
26
+ * Create (execute) a Business Transaction. Maps to POST
27
+ * /transactions: a second, independent entry point into the
28
+ * identical application.execute() pipeline as ExecutionApi.execute()
29
+ * (POST /execute). The only behavioral difference is the success
30
+ * status code, 201 instead of 200; the response body shape is
31
+ * otherwise identical.
32
+ */
33
+ async create(transaction) {
34
+ const response = await this.transport.send({
35
+ method: "POST",
36
+ path: "/transactions",
37
+ body: transaction,
38
+ });
39
+ return response.body;
40
+ }
41
+ /**
42
+ * Retrieve a Business Transaction.
43
+ */
44
+ async get(businessTransactionId) {
45
+ const response = await this.transport.send({
46
+ method: "GET",
47
+ path: `/transactions/${businessTransactionId}`,
48
+ });
49
+ return response.body;
50
+ }
51
+ /**
52
+ * List Business Transactions.
53
+ */
54
+ async list(page = 1, pageSize = 25) {
55
+ const response = await this.transport.send({
56
+ method: "GET",
57
+ path: `/transactions?page=${page}&pageSize=${pageSize}`,
58
+ });
59
+ return response.body;
60
+ }
61
+ }
62
+ //# sourceMappingURL=TransactionApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionApi.js","sourceRoot":"","sources":["../../src/client/TransactionApi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,cAAc;IAEN;IADnB,YACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAEJ;;;;;;;OAOG;IACI,KAAK,CAAC,MAAM,CACjB,WAAgC;QAEhC,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAuB;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,WAAW;SAClB,CAAC,CAAC;QAEL,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,GAAG,CACd,qBAA6B;QAE7B,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAsB;YAC7C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,qBAAqB,EAAE;SAC/C,CAAC,CAAC;QAEL,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CAAC,EACR,QAAQ,GAAG,EAAE;QAEb,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAwB;YAC/C,MAAM,EAAE,KAAK;YACb,IAAI,EACF,sBAAsB,IAAI,aAAa,QAAQ,EAAE;SACpD,CAAC,CAAC;QAEL,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF"}