@deepraxis/sdk 0.2.0-dev.053bf41 → 0.2.0-dev.142bee8
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/METHODS.md +2 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +8 -2
- package/dist/generated/sdk.gen.js +23 -1
- package/dist/generated/types.gen.d.ts +74 -0
- package/dist/operations.generated.js +59 -1
- package/dist/resources.generated.d.ts +6 -0
- package/dist/resources.generated.js +1 -0
- package/package.json +1 -1
|
@@ -79583,6 +79583,80 @@ export type ListOrganizationNotificationLettersResponses = {
|
|
|
79583
79583
|
};
|
|
79584
79584
|
};
|
|
79585
79585
|
export type ListOrganizationNotificationLettersResponse = ListOrganizationNotificationLettersResponses[keyof ListOrganizationNotificationLettersResponses];
|
|
79586
|
+
export type CreateOrganizationNotificationLetterData = {
|
|
79587
|
+
body: {
|
|
79588
|
+
/**
|
|
79589
|
+
* The recipient's address: human:<user id> or agent:<agent id>, a member or an agent of this organization.
|
|
79590
|
+
*/
|
|
79591
|
+
to: string;
|
|
79592
|
+
/**
|
|
79593
|
+
* The whole letter, 1 to 16000 characters.
|
|
79594
|
+
*/
|
|
79595
|
+
body: string;
|
|
79596
|
+
/**
|
|
79597
|
+
* One sentence saying what the reader is asked to do or needs to know, at most 60 characters. Required when to is a person; refused, never cut, when longer.
|
|
79598
|
+
*/
|
|
79599
|
+
summary?: string;
|
|
79600
|
+
/**
|
|
79601
|
+
* The letter's kind; it decides the channels. Defaults to mention.
|
|
79602
|
+
*/
|
|
79603
|
+
kind?: 'notice' | 'mention' | 'decision';
|
|
79604
|
+
/**
|
|
79605
|
+
* The conversation the letter belongs to, free text; omit for none.
|
|
79606
|
+
*/
|
|
79607
|
+
thread?: string;
|
|
79608
|
+
/**
|
|
79609
|
+
* When to deliver it, ISO 8601, at most 366 days ahead. A past time or no value means now.
|
|
79610
|
+
*/
|
|
79611
|
+
deliver_at?: string;
|
|
79612
|
+
};
|
|
79613
|
+
path?: never;
|
|
79614
|
+
query?: never;
|
|
79615
|
+
url: '/organization/v1/notifications/letters';
|
|
79616
|
+
};
|
|
79617
|
+
export type CreateOrganizationNotificationLetterErrors = {
|
|
79618
|
+
/**
|
|
79619
|
+
* `to` is not an address, `body` is missing or too long, `summary` is missing for a person or longer than 60 characters, `kind` is unknown, or `deliver_at` is not an ISO 8601 time within 366 days (RFC 9457 problem).
|
|
79620
|
+
*/
|
|
79621
|
+
400: unknown;
|
|
79622
|
+
/**
|
|
79623
|
+
* Missing or invalid credential (RFC 9457 problem).
|
|
79624
|
+
*/
|
|
79625
|
+
401: unknown;
|
|
79626
|
+
/**
|
|
79627
|
+
* `PERMISSION_DENIED`: sending a letter needs a person, an agent or an automation run identity; an organization API key or an application cannot send (RFC 9457 problem).
|
|
79628
|
+
*/
|
|
79629
|
+
403: unknown;
|
|
79630
|
+
/**
|
|
79631
|
+
* `SUBSCRIBER_NOT_FOUND`: the recipient is not a member or an agent of this organization (RFC 9457 problem).
|
|
79632
|
+
*/
|
|
79633
|
+
404: unknown;
|
|
79634
|
+
/**
|
|
79635
|
+
* The notification service did not answer, or failed in a way it did not classify (RFC 9457 problem, `UNAVAILABLE`). A refusal the service classifies is never a 502 — it reaches the caller in its own class (400, 403, 404), so a client may act on it.
|
|
79636
|
+
*/
|
|
79637
|
+
502: unknown;
|
|
79638
|
+
};
|
|
79639
|
+
export type CreateOrganizationNotificationLetterResponses = {
|
|
79640
|
+
/**
|
|
79641
|
+
* The letter is written; it is delivered at deliverAt.
|
|
79642
|
+
*/
|
|
79643
|
+
200: {
|
|
79644
|
+
/**
|
|
79645
|
+
* The letter that was written: its id and the time it is delivered.
|
|
79646
|
+
*/
|
|
79647
|
+
letter: {
|
|
79648
|
+
/**
|
|
79649
|
+
* The letter's id.
|
|
79650
|
+
*/
|
|
79651
|
+
id: string;
|
|
79652
|
+
/**
|
|
79653
|
+
* When it is delivered: now, or the time asked for.
|
|
79654
|
+
*/
|
|
79655
|
+
deliverAt: string;
|
|
79656
|
+
};
|
|
79657
|
+
};
|
|
79658
|
+
};
|
|
79659
|
+
export type CreateOrganizationNotificationLetterResponse = CreateOrganizationNotificationLetterResponses[keyof CreateOrganizationNotificationLetterResponses];
|
|
79586
79660
|
export type GetOrganizationNotificationLetterData = {
|
|
79587
79661
|
body?: never;
|
|
79588
79662
|
path: {
|
|
@@ -26521,6 +26521,64 @@ export const operations = [
|
|
|
26521
26521
|
}
|
|
26522
26522
|
]
|
|
26523
26523
|
},
|
|
26524
|
+
{
|
|
26525
|
+
"resource": "organization.notifications.letters",
|
|
26526
|
+
"method": "create",
|
|
26527
|
+
"summary": "Send a letter to a person or an agent",
|
|
26528
|
+
"description": "Write one letter to a member or an agent of this organization, for an automation script or an outside caller that needs to reach someone, or to leave itself an alarm: a letter to your own address is allowed and arrives at its deliver_at. The sender is the credential's own and is never a request field — a person writes as themselves, an agent as itself, and an automation run (a scheduled or service-started one included) as the platform's automation sender with the run recorded in the letter's source; a `sender` in the body is ignored. Any other credential (an organization API key, an application) has no address to write from and is refused with 403. The recipient must belong to this organization: a person or agent of another organization answers 404 without saying whether it exists. A letter to a person needs a summary of at most 60 characters — one sentence saying what the reader must do or know; a longer one is refused, never cut. An agent's letter may leave summary out and the first line of body stands in. Repeating the same letter (same recipient, kind, thread, body and time) returns the same id and writes it once. Usage charge: none.",
|
|
26529
|
+
"http": "POST",
|
|
26530
|
+
"path": "/organization/v1/notifications/letters",
|
|
26531
|
+
"streaming": "no",
|
|
26532
|
+
"pagination": false,
|
|
26533
|
+
"pathParams": [],
|
|
26534
|
+
"query": [],
|
|
26535
|
+
"body": {
|
|
26536
|
+
"required": true,
|
|
26537
|
+
"fields": [
|
|
26538
|
+
{
|
|
26539
|
+
"name": "to",
|
|
26540
|
+
"type": "string",
|
|
26541
|
+
"required": true,
|
|
26542
|
+
"description": "The recipient's address: human:<user id> or agent:<agent id>, a member or an agent of this organization."
|
|
26543
|
+
},
|
|
26544
|
+
{
|
|
26545
|
+
"name": "body",
|
|
26546
|
+
"type": "string",
|
|
26547
|
+
"required": true,
|
|
26548
|
+
"description": "The whole letter, 1 to 16000 characters."
|
|
26549
|
+
},
|
|
26550
|
+
{
|
|
26551
|
+
"name": "summary",
|
|
26552
|
+
"type": "string",
|
|
26553
|
+
"required": false,
|
|
26554
|
+
"description": "One sentence saying what the reader is asked to do or needs to know, at most 60 characters. Required when to is a person; refused, never cut, when longer."
|
|
26555
|
+
},
|
|
26556
|
+
{
|
|
26557
|
+
"name": "kind",
|
|
26558
|
+
"type": "string",
|
|
26559
|
+
"enum": [
|
|
26560
|
+
"notice",
|
|
26561
|
+
"mention",
|
|
26562
|
+
"decision"
|
|
26563
|
+
],
|
|
26564
|
+
"required": false,
|
|
26565
|
+
"description": "The letter's kind; it decides the channels. Defaults to mention."
|
|
26566
|
+
},
|
|
26567
|
+
{
|
|
26568
|
+
"name": "thread",
|
|
26569
|
+
"type": "string",
|
|
26570
|
+
"required": false,
|
|
26571
|
+
"description": "The conversation the letter belongs to, free text; omit for none."
|
|
26572
|
+
},
|
|
26573
|
+
{
|
|
26574
|
+
"name": "deliver_at",
|
|
26575
|
+
"type": "string",
|
|
26576
|
+
"required": false,
|
|
26577
|
+
"description": "When to deliver it, ISO 8601, at most 366 days ahead. A past time or no value means now."
|
|
26578
|
+
}
|
|
26579
|
+
]
|
|
26580
|
+
}
|
|
26581
|
+
},
|
|
26524
26582
|
{
|
|
26525
26583
|
"resource": "organization.notifications.letters",
|
|
26526
26584
|
"method": "retrieve",
|
|
@@ -26714,7 +26772,7 @@ export const operations = [
|
|
|
26714
26772
|
"resource": "organization.usage",
|
|
26715
26773
|
"method": "list",
|
|
26716
26774
|
"summary": "List Organization Usage",
|
|
26717
|
-
"description": "Consumed quantity per time bucket per group. Buckets are whole
|
|
26775
|
+
"description": "Consumed quantity per time bucket per group. Buckets are whole hour or day periods in time_zone (UTC by default) covering the requested window. Each result carries exactly one ConsumedQuantity + ConsumedUnit — quantities of different units are never added together.\n",
|
|
26718
26776
|
"http": "GET",
|
|
26719
26777
|
"path": "/organization/v1/usage",
|
|
26720
26778
|
"streaming": "no",
|
|
@@ -8045,6 +8045,12 @@ export declare function createOrganization(transport: Transport): {
|
|
|
8045
8045
|
archive: (options: import("./core/transport.js").CallOptions<Types.ArchiveOrganizationNotificationLetterData>) => Promise<{
|
|
8046
8046
|
unread: number;
|
|
8047
8047
|
}>;
|
|
8048
|
+
create: (options: import("./core/transport.js").CallOptions<Types.CreateOrganizationNotificationLetterData>) => Promise<{
|
|
8049
|
+
letter: {
|
|
8050
|
+
id: string;
|
|
8051
|
+
deliverAt: string;
|
|
8052
|
+
};
|
|
8053
|
+
}>;
|
|
8048
8054
|
list: (options?: import("./core/transport.js").CallOptions<Types.ListOrganizationNotificationLettersData> | undefined) => Promise<{
|
|
8049
8055
|
letters: Array<{
|
|
8050
8056
|
id: string;
|
|
@@ -1490,6 +1490,7 @@ export function createOrganization(transport) {
|
|
|
1490
1490
|
},
|
|
1491
1491
|
letters: {
|
|
1492
1492
|
archive: bind(transport, sdk.archiveOrganizationNotificationLetter),
|
|
1493
|
+
create: bind(transport, sdk.createOrganizationNotificationLetter),
|
|
1493
1494
|
list: bind(transport, sdk.listOrganizationNotificationLetters),
|
|
1494
1495
|
read: bind(transport, sdk.readOrganizationNotificationLetter),
|
|
1495
1496
|
readAll: bind(transport, sdk.readAllOrganizationNotificationLetters),
|