@cubist-labs/cubesigner-sdk 0.4.267 → 0.4.268
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/dist/package.json +1 -1
- package/dist/src/audit_log.d.ts +1 -1
- package/dist/src/audit_log.d.ts.map +1 -1
- package/dist/src/audit_log.js +4 -2
- package/dist/src/client/api_client.d.ts +13 -1
- package/dist/src/client/api_client.d.ts.map +1 -1
- package/dist/src/client/api_client.js +16 -1
- package/package.json +1 -1
- package/src/audit_log.ts +6 -1
- package/src/client/api_client.ts +25 -0
package/package.json
CHANGED
package/src/audit_log.ts
CHANGED
|
@@ -47,7 +47,12 @@ export const auditLogEntrySchema = z.discriminatedUnion("event", [
|
|
|
47
47
|
membership: schemaString<MemberRole>(),
|
|
48
48
|
email: z.optional(z.string()),
|
|
49
49
|
username: z.optional(z.string()),
|
|
50
|
-
scopes
|
|
50
|
+
// `scopes` is stored as a comma-joined string, so we parse it as a string and split it back
|
|
51
|
+
// into an array.
|
|
52
|
+
scopes: z.pipe(
|
|
53
|
+
z.string(),
|
|
54
|
+
z.transform((s) => s.split(",")),
|
|
55
|
+
),
|
|
51
56
|
}),
|
|
52
57
|
z.object({
|
|
53
58
|
...baseFields,
|
package/src/client/api_client.ts
CHANGED
|
@@ -62,6 +62,7 @@ import type {
|
|
|
62
62
|
ContactLabel,
|
|
63
63
|
ContactAddressData,
|
|
64
64
|
AuditLogRequest,
|
|
65
|
+
AuditLogResponse,
|
|
65
66
|
ValidatedAuditLogResponse,
|
|
66
67
|
AuditLogEntry,
|
|
67
68
|
RoleInfoJwt,
|
|
@@ -624,6 +625,30 @@ export class ApiClient extends BaseClient {
|
|
|
624
625
|
);
|
|
625
626
|
}
|
|
626
627
|
|
|
628
|
+
/**
|
|
629
|
+
* Query the audit log, returning the raw (unparsed) entries.
|
|
630
|
+
*
|
|
631
|
+
* Unlike {@link orgQueryAuditLog}, this method does not attempt to validate or
|
|
632
|
+
* parse the audit log entries against `auditLogEntrySchema`; entries are
|
|
633
|
+
* returned exactly as received from the server.
|
|
634
|
+
*
|
|
635
|
+
* @param body The query.
|
|
636
|
+
* @param page Pagination options. Default to fetching the entire result set.
|
|
637
|
+
* @returns Requested audit log with raw entries.
|
|
638
|
+
*/
|
|
639
|
+
orgQueryAuditLogRaw(
|
|
640
|
+
body: AuditLogRequest,
|
|
641
|
+
page?: PageOpts,
|
|
642
|
+
): Paginator<AuditLogResponse, AuditLogResponse["entries"]> {
|
|
643
|
+
const o = op("/v0/org/{org_id}/audit", "post");
|
|
644
|
+
return Paginator.items(
|
|
645
|
+
page ?? Page.default(),
|
|
646
|
+
(query) => this.exec(o, { body, params: { query } }),
|
|
647
|
+
(r) => r.entries,
|
|
648
|
+
(r) => r.last_evaluated_key,
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
|
|
627
652
|
/**
|
|
628
653
|
* Query org metrics.
|
|
629
654
|
*
|