@pam-ai/pam-ordo-contracts 3.4.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.
- package/README.md +72 -0
- package/dist/generated.d.ts +1848 -0
- package/dist/generated.d.ts.map +1 -0
- package/dist/generated.js +6 -0
- package/dist/generated.js.map +1 -0
- package/dist/inbox-policy.d.ts +9 -0
- package/dist/inbox-policy.d.ts.map +1 -0
- package/dist/inbox-policy.js +27 -0
- package/dist/inbox-policy.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/ordo-capability.d.ts +27 -0
- package/dist/ordo-capability.d.ts.map +1 -0
- package/dist/ordo-capability.js +37 -0
- package/dist/ordo-capability.js.map +1 -0
- package/dist/producer-command.d.ts +18 -0
- package/dist/producer-command.d.ts.map +1 -0
- package/dist/producer-command.js +38 -0
- package/dist/producer-command.js.map +1 -0
- package/fixtures/acknowledge-attention-command.json +8 -0
- package/fixtures/add-customer-note-command.json +6 -0
- package/fixtures/add-internal-comment-command.json +9 -0
- package/fixtures/advance-read-cursor-command.json +6 -0
- package/fixtures/assign-command.json +11 -0
- package/fixtures/assign-team-routing-command.json +11 -0
- package/fixtures/command-result.json +10 -0
- package/fixtures/contact-search.json +111 -0
- package/fixtures/conversation-detail-missing-body.json +133 -0
- package/fixtures/customer-note-command-result.json +10 -0
- package/fixtures/customer-notes-page.json +17 -0
- package/fixtures/delete-customer-note-command.json +7 -0
- package/fixtures/inbox-list-customer-no-work.json +93 -0
- package/fixtures/inbox-list-partial-hydration.json +175 -0
- package/fixtures/inbox-policy-v1.json +33 -0
- package/fixtures/inbox-target-resolution-request-v1.json +8 -0
- package/fixtures/inbox-target-resolution-response-v1.json +23 -0
- package/fixtures/internal-comment-result.json +13 -0
- package/fixtures/manifest.json +32 -0
- package/fixtures/notification-command-result.json +10 -0
- package/fixtures/notification-command.json +5 -0
- package/fixtures/notification-list.json +25 -0
- package/fixtures/permissions-unavailable.json +7 -0
- package/fixtures/producer-attention-command-v1.json +28 -0
- package/fixtures/producer-invalid-actor-command-v1.json +17 -0
- package/fixtures/producer-invalid-customer-identity-v1.json +15 -0
- package/fixtures/producer-invalid-missing-source-version-v1.json +16 -0
- package/fixtures/producer-invalid-oversized-v1.json +15 -0
- package/fixtures/producer-invalid-unknown-field-v1.json +17 -0
- package/fixtures/producer-overdue-fire-command-v1.json +21 -0
- package/fixtures/producer-reminder-fire-command-v1.json +20 -0
- package/fixtures/producer-snooze-return-command-v1.json +20 -0
- package/fixtures/producer-source-activity-command-v1.json +34 -0
- package/fixtures/read-cursor-result.json +10 -0
- package/fixtures/resolve-attention-command.json +9 -0
- package/fixtures/version-conflict.json +11 -0
- package/openapi/openapi.json +4577 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Pam Ordo contracts
|
|
2
|
+
|
|
3
|
+
The versioned OpenAPI contract, generated TypeScript types, and shared fixtures for Pam Ordo APIs.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Pin consumers to an exact npm version:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@pam-ai/pam-ordo-contracts": "3.4.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import type {
|
|
19
|
+
ConversationDetailResponse,
|
|
20
|
+
InboxListResponse,
|
|
21
|
+
NotificationListResponse,
|
|
22
|
+
CommandResult,
|
|
23
|
+
ErrorEnvelope,
|
|
24
|
+
paths,
|
|
25
|
+
} from '@pam-ai/pam-ordo-contracts';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
FIFO producers also import `ProducerCommandV1` plus the deterministic
|
|
29
|
+
`producerMessageGroupId`, `producerMessageDeduplicationId`, and
|
|
30
|
+
`producerMessageAttributes` helpers. The helpers keep every producer aligned
|
|
31
|
+
with the ordered-consumer contract without introducing an AWS SDK dependency.
|
|
32
|
+
|
|
33
|
+
Policy and authority consumers import `InboxPolicyV1`,
|
|
34
|
+
`InboxTargetResolutionRequestV1`, and `InboxTargetResolutionResponseV1`.
|
|
35
|
+
Use `inboxPolicyVersion` to derive the immutable `sha256:` policy snapshot ID
|
|
36
|
+
from canonical normalized policy content. `InboxPolicyV1` intentionally rejects
|
|
37
|
+
legacy timed-escalation fields.
|
|
38
|
+
|
|
39
|
+
The public npm artifact contains compiled TypeScript declarations, bundled OpenAPI, and shared fixtures. Consumers do not need GitHub repository credentials.
|
|
40
|
+
|
|
41
|
+
## Contract development
|
|
42
|
+
|
|
43
|
+
`openapi/openapi.yaml` is the source of truth. Bundled JSON and generated TypeScript are committed for review.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install
|
|
47
|
+
npm run contract:generate
|
|
48
|
+
npm run check
|
|
49
|
+
npm pack --dry-run
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Quality commands
|
|
53
|
+
|
|
54
|
+
The repository follows the dashboard conventions for linting, formatting, and dependency auditing:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm run lint
|
|
58
|
+
npm run lint:fix
|
|
59
|
+
npm run format
|
|
60
|
+
npm run format:check
|
|
61
|
+
npm run npm-audit
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Generated TypeScript and bundled OpenAPI are excluded from ESLint and Prettier; their generators enforce deterministic output. CI uses Pam's shared lint and audit actions.
|
|
65
|
+
|
|
66
|
+
Breaking changes require a major version bump:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run contract:breaking -- --base <full-base-commit-sha>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Follow [docs/PUBLISHING.md](docs/PUBLISHING.md) to publish an immutable npm version and matching Git tag. Consumers should pin the exact npm version.
|