@mitumba/sdk 5.15.0 → 5.17.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/dist/index.d.mts +140 -2
- package/dist/index.d.ts +140 -2
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1018,7 +1018,7 @@ interface CreateReportInput {
|
|
|
1018
1018
|
reason: 'counterfeit' | 'offensive' | 'spam' | 'scam' | 'other';
|
|
1019
1019
|
detail?: string;
|
|
1020
1020
|
}
|
|
1021
|
-
type AdminPermission = 'admin:read' | 'users:moderate' | 'ip:block' | 'listings:moderate' | 'orders:transition' | 'payouts:disburse' | 'sellers:verify' | 'recovery:review' | 'broadcast:send' | 'clients:manage' | 'oidc:rotate_keys' | 'roles:grant' | 'audit:read';
|
|
1021
|
+
type AdminPermission = 'admin:read' | 'users:moderate' | 'ip:block' | 'listings:moderate' | 'orders:transition' | 'payouts:disburse' | 'sellers:verify' | 'recovery:review' | 'broadcast:send' | 'clients:manage' | 'oidc:rotate_keys' | 'roles:grant' | 'audit:read' | 'library:read_all';
|
|
1022
1022
|
type AdminAuthStrength = 'password' | 'sms' | 'email' | 'totp' | 'passkey';
|
|
1023
1023
|
interface AdminRolePreset {
|
|
1024
1024
|
id: string;
|
|
@@ -1157,6 +1157,121 @@ interface OidcSigningKey {
|
|
|
1157
1157
|
created_at: string;
|
|
1158
1158
|
rotated_at: string | null;
|
|
1159
1159
|
}
|
|
1160
|
+
type LibraryKind = 'runbook' | 'routine' | 'incident' | 'reference';
|
|
1161
|
+
/** The coarse label of a schedule: its most frequent rule. */
|
|
1162
|
+
type LibraryCadence = 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
1163
|
+
type LibraryWeekday = 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
1164
|
+
/** Part of the year, MM-DD to MM-DD inclusive. `from` after `to` wraps the new year. */
|
|
1165
|
+
interface LibrarySeason {
|
|
1166
|
+
from: string;
|
|
1167
|
+
to: string;
|
|
1168
|
+
}
|
|
1169
|
+
/** One rule of a routine's schedule. Every day is East Africa Time. */
|
|
1170
|
+
type LibraryScheduleRule = {
|
|
1171
|
+
every: 'daily';
|
|
1172
|
+
during: LibrarySeason | null;
|
|
1173
|
+
} | {
|
|
1174
|
+
every: 'weekdays';
|
|
1175
|
+
during: LibrarySeason | null;
|
|
1176
|
+
} | {
|
|
1177
|
+
every: 'weekly';
|
|
1178
|
+
weekday: LibraryWeekday;
|
|
1179
|
+
during: LibrarySeason | null;
|
|
1180
|
+
} | {
|
|
1181
|
+
every: 'monthly';
|
|
1182
|
+
day: number | 'last';
|
|
1183
|
+
during: LibrarySeason | null;
|
|
1184
|
+
} | {
|
|
1185
|
+
every: 'quarterly';
|
|
1186
|
+
day: number | 'last';
|
|
1187
|
+
} | {
|
|
1188
|
+
every: 'yearly';
|
|
1189
|
+
date: string;
|
|
1190
|
+
};
|
|
1191
|
+
/** When a routine is due: on any day at least one rule matches. */
|
|
1192
|
+
interface LibrarySchedule {
|
|
1193
|
+
rules: LibraryScheduleRule[];
|
|
1194
|
+
/** The rules in plain words, e.g. "Every Monday". */
|
|
1195
|
+
label: string;
|
|
1196
|
+
/** Days ahead of a monthly, quarterly or yearly due day the audience is reminded; 0 for none. */
|
|
1197
|
+
noticeDays: number;
|
|
1198
|
+
/** Days after the due day before an unrecorded occurrence is escalated; null uses each rule's default. */
|
|
1199
|
+
graceDays: number | null;
|
|
1200
|
+
}
|
|
1201
|
+
/** Where one occurrence of a routine stands. `missed` occurrences may still be recorded, as late. */
|
|
1202
|
+
type LibraryOccurrenceStatus = 'upcoming' | 'due' | 'missed' | 'done';
|
|
1203
|
+
/** Who recorded an occurrence: a users.id or `iam:<id>`, with their name and address when known. */
|
|
1204
|
+
interface LibraryCompleter {
|
|
1205
|
+
subject: string;
|
|
1206
|
+
name: string | null;
|
|
1207
|
+
email: string | null;
|
|
1208
|
+
}
|
|
1209
|
+
/** One due day of a routine. */
|
|
1210
|
+
interface LibraryOccurrence {
|
|
1211
|
+
/** YYYY-MM-DD. */
|
|
1212
|
+
dueOn: string;
|
|
1213
|
+
status: LibraryOccurrenceStatus;
|
|
1214
|
+
/** YYYY-MM-DD: the last day it may be recorded before it counts as missed. */
|
|
1215
|
+
graceEndsOn: string;
|
|
1216
|
+
completedAt: string | null;
|
|
1217
|
+
completedBy: LibraryCompleter | null;
|
|
1218
|
+
note: string | null;
|
|
1219
|
+
}
|
|
1220
|
+
/** Where a scheduled routine stands today. */
|
|
1221
|
+
interface LibraryRoutineState {
|
|
1222
|
+
/** The latest due day on or before today, or null when none falls in the lookback. */
|
|
1223
|
+
current: LibraryOccurrence | null;
|
|
1224
|
+
/** YYYY-MM-DD, or null when no due day falls within a year. */
|
|
1225
|
+
nextDueOn: string | null;
|
|
1226
|
+
/** Missed and still unrecorded occurrences (since tracking began, at most 45 days back). */
|
|
1227
|
+
missedCount: number;
|
|
1228
|
+
}
|
|
1229
|
+
/** The result of `admin.completeLibraryOccurrence()`. */
|
|
1230
|
+
interface LibraryOccurrenceRecorded {
|
|
1231
|
+
ok: true;
|
|
1232
|
+
occurrence: LibraryOccurrence;
|
|
1233
|
+
}
|
|
1234
|
+
/** A library document as listed by `admin.listLibrary()`. Never includes the body. */
|
|
1235
|
+
interface LibraryDocumentSummary {
|
|
1236
|
+
slug: string;
|
|
1237
|
+
title: string;
|
|
1238
|
+
summary: string;
|
|
1239
|
+
kind: LibraryKind;
|
|
1240
|
+
/** The permissions that may read this document (any one of them suffices). */
|
|
1241
|
+
audience: AdminPermission[];
|
|
1242
|
+
owner: string;
|
|
1243
|
+
/** How often a routine is carried out, coarsely; null when the document has no schedule. */
|
|
1244
|
+
cadence: LibraryCadence | null;
|
|
1245
|
+
/** When the routine is due; null when the document has no schedule. */
|
|
1246
|
+
schedule: LibrarySchedule | null;
|
|
1247
|
+
/**
|
|
1248
|
+
* Where the routine stands today. Null for an unscheduled document, and also when the worker
|
|
1249
|
+
* cannot read routine state at the moment (the document itself is still served).
|
|
1250
|
+
*/
|
|
1251
|
+
routine: LibraryRoutineState | null;
|
|
1252
|
+
/** How often the document itself must be re-checked. */
|
|
1253
|
+
reviewEveryDays: number;
|
|
1254
|
+
/** YYYY-MM-DD. */
|
|
1255
|
+
lastReviewed: string;
|
|
1256
|
+
/** YYYY-MM-DD: `lastReviewed` plus `reviewEveryDays`. */
|
|
1257
|
+
reviewDueOn: string;
|
|
1258
|
+
/** True once `reviewDueOn` has passed. */
|
|
1259
|
+
reviewOverdue: boolean;
|
|
1260
|
+
}
|
|
1261
|
+
/** One library document with its markdown body, from `admin.getLibraryDocument()`. */
|
|
1262
|
+
interface LibraryDocument extends LibraryDocumentSummary {
|
|
1263
|
+
markdown: string;
|
|
1264
|
+
/** Recent occurrences, newest first, starting with the next due day. Empty when unscheduled. */
|
|
1265
|
+
occurrences: LibraryOccurrence[];
|
|
1266
|
+
/** True when the caller's role is in the audience, so they may record occurrences as done. */
|
|
1267
|
+
can_record: boolean;
|
|
1268
|
+
}
|
|
1269
|
+
interface LibraryListing {
|
|
1270
|
+
/** Only the documents the caller may read. */
|
|
1271
|
+
documents: LibraryDocumentSummary[];
|
|
1272
|
+
/** True when the caller holds `library:read_all` and so sees every document. */
|
|
1273
|
+
can_read_all: boolean;
|
|
1274
|
+
}
|
|
1160
1275
|
|
|
1161
1276
|
interface AuthTokens {
|
|
1162
1277
|
access_token: string;
|
|
@@ -4329,6 +4444,29 @@ declare class AdminModule {
|
|
|
4329
4444
|
ok: true;
|
|
4330
4445
|
kid: string;
|
|
4331
4446
|
}>;
|
|
4447
|
+
/**
|
|
4448
|
+
* The library documents the caller may read: summaries only, never bodies. Any operator may call
|
|
4449
|
+
* this; each document's `audience` decides whether it is listed. `can_read_all` is true for a
|
|
4450
|
+
* caller holding `library:read_all`, who sees every document.
|
|
4451
|
+
*/
|
|
4452
|
+
listLibrary(options?: RequestOptions): Promise<LibraryListing>;
|
|
4453
|
+
/**
|
|
4454
|
+
* One library document with its markdown body. A document the caller may not read is reported
|
|
4455
|
+
* exactly like one that does not exist (404).
|
|
4456
|
+
*/
|
|
4457
|
+
getLibraryDocument(slug: string, options?: RequestOptions): Promise<LibraryDocument>;
|
|
4458
|
+
/**
|
|
4459
|
+
* Record one occurrence of a scheduled routine as done, with an optional note (at most 500
|
|
4460
|
+
* characters). Only an operator whose role is in the document's audience may record it
|
|
4461
|
+
* (`LibraryDocument.can_record`); the librarian's `library:read_all` alone is not enough.
|
|
4462
|
+
*
|
|
4463
|
+
* `dueOn` (YYYY-MM-DD) must be one of the routine's due days, no more than 45 days old and no
|
|
4464
|
+
* further ahead than its notice. Errors: 403 not in the audience, 404 not readable, 409 already
|
|
4465
|
+
* recorded (the body carries the existing `occurrence`), 422 `invalid_occurrence` with a `reason`
|
|
4466
|
+
* (`not_scheduled`, `not_a_due_day`, `too_early`, `too_old`). Recorded on the audit trail as
|
|
4467
|
+
* `library.routine.completed`.
|
|
4468
|
+
*/
|
|
4469
|
+
completeLibraryOccurrence(slug: string, dueOn: string, note?: string, options?: RequestOptions): Promise<LibraryOccurrenceRecorded>;
|
|
4332
4470
|
listPayoutsAwaitingApproval(options?: RequestOptions): Promise<{
|
|
4333
4471
|
payouts: PendingPayoutApproval[];
|
|
4334
4472
|
}>;
|
|
@@ -4807,4 +4945,4 @@ declare class MitumbaClient {
|
|
|
4807
4945
|
isAuthenticated(): Promise<boolean>;
|
|
4808
4946
|
}
|
|
4809
4947
|
|
|
4810
|
-
export { APIClient, APIError, type APIErrorResponse, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminReport, type AdminRolePreset, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutStatus, type CheckoutStatusResponse, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type Jwk, type Jwks, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportReason, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type ShareUrlOptions, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreResolveThreadInput, type StoreReviewsPage, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isConsentRequired, isMessagingAPIError, isValidPhone, listingShareUrl, maskPhone, normalizePhone, regionById, storeShareUrl };
|
|
4948
|
+
export { APIClient, APIError, type APIErrorResponse, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminReport, type AdminRolePreset, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutStatus, type CheckoutStatusResponse, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type Jwk, type Jwks, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportReason, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type ShareUrlOptions, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreResolveThreadInput, type StoreReviewsPage, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isConsentRequired, isMessagingAPIError, isValidPhone, listingShareUrl, maskPhone, normalizePhone, regionById, storeShareUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1018,7 +1018,7 @@ interface CreateReportInput {
|
|
|
1018
1018
|
reason: 'counterfeit' | 'offensive' | 'spam' | 'scam' | 'other';
|
|
1019
1019
|
detail?: string;
|
|
1020
1020
|
}
|
|
1021
|
-
type AdminPermission = 'admin:read' | 'users:moderate' | 'ip:block' | 'listings:moderate' | 'orders:transition' | 'payouts:disburse' | 'sellers:verify' | 'recovery:review' | 'broadcast:send' | 'clients:manage' | 'oidc:rotate_keys' | 'roles:grant' | 'audit:read';
|
|
1021
|
+
type AdminPermission = 'admin:read' | 'users:moderate' | 'ip:block' | 'listings:moderate' | 'orders:transition' | 'payouts:disburse' | 'sellers:verify' | 'recovery:review' | 'broadcast:send' | 'clients:manage' | 'oidc:rotate_keys' | 'roles:grant' | 'audit:read' | 'library:read_all';
|
|
1022
1022
|
type AdminAuthStrength = 'password' | 'sms' | 'email' | 'totp' | 'passkey';
|
|
1023
1023
|
interface AdminRolePreset {
|
|
1024
1024
|
id: string;
|
|
@@ -1157,6 +1157,121 @@ interface OidcSigningKey {
|
|
|
1157
1157
|
created_at: string;
|
|
1158
1158
|
rotated_at: string | null;
|
|
1159
1159
|
}
|
|
1160
|
+
type LibraryKind = 'runbook' | 'routine' | 'incident' | 'reference';
|
|
1161
|
+
/** The coarse label of a schedule: its most frequent rule. */
|
|
1162
|
+
type LibraryCadence = 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
1163
|
+
type LibraryWeekday = 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
1164
|
+
/** Part of the year, MM-DD to MM-DD inclusive. `from` after `to` wraps the new year. */
|
|
1165
|
+
interface LibrarySeason {
|
|
1166
|
+
from: string;
|
|
1167
|
+
to: string;
|
|
1168
|
+
}
|
|
1169
|
+
/** One rule of a routine's schedule. Every day is East Africa Time. */
|
|
1170
|
+
type LibraryScheduleRule = {
|
|
1171
|
+
every: 'daily';
|
|
1172
|
+
during: LibrarySeason | null;
|
|
1173
|
+
} | {
|
|
1174
|
+
every: 'weekdays';
|
|
1175
|
+
during: LibrarySeason | null;
|
|
1176
|
+
} | {
|
|
1177
|
+
every: 'weekly';
|
|
1178
|
+
weekday: LibraryWeekday;
|
|
1179
|
+
during: LibrarySeason | null;
|
|
1180
|
+
} | {
|
|
1181
|
+
every: 'monthly';
|
|
1182
|
+
day: number | 'last';
|
|
1183
|
+
during: LibrarySeason | null;
|
|
1184
|
+
} | {
|
|
1185
|
+
every: 'quarterly';
|
|
1186
|
+
day: number | 'last';
|
|
1187
|
+
} | {
|
|
1188
|
+
every: 'yearly';
|
|
1189
|
+
date: string;
|
|
1190
|
+
};
|
|
1191
|
+
/** When a routine is due: on any day at least one rule matches. */
|
|
1192
|
+
interface LibrarySchedule {
|
|
1193
|
+
rules: LibraryScheduleRule[];
|
|
1194
|
+
/** The rules in plain words, e.g. "Every Monday". */
|
|
1195
|
+
label: string;
|
|
1196
|
+
/** Days ahead of a monthly, quarterly or yearly due day the audience is reminded; 0 for none. */
|
|
1197
|
+
noticeDays: number;
|
|
1198
|
+
/** Days after the due day before an unrecorded occurrence is escalated; null uses each rule's default. */
|
|
1199
|
+
graceDays: number | null;
|
|
1200
|
+
}
|
|
1201
|
+
/** Where one occurrence of a routine stands. `missed` occurrences may still be recorded, as late. */
|
|
1202
|
+
type LibraryOccurrenceStatus = 'upcoming' | 'due' | 'missed' | 'done';
|
|
1203
|
+
/** Who recorded an occurrence: a users.id or `iam:<id>`, with their name and address when known. */
|
|
1204
|
+
interface LibraryCompleter {
|
|
1205
|
+
subject: string;
|
|
1206
|
+
name: string | null;
|
|
1207
|
+
email: string | null;
|
|
1208
|
+
}
|
|
1209
|
+
/** One due day of a routine. */
|
|
1210
|
+
interface LibraryOccurrence {
|
|
1211
|
+
/** YYYY-MM-DD. */
|
|
1212
|
+
dueOn: string;
|
|
1213
|
+
status: LibraryOccurrenceStatus;
|
|
1214
|
+
/** YYYY-MM-DD: the last day it may be recorded before it counts as missed. */
|
|
1215
|
+
graceEndsOn: string;
|
|
1216
|
+
completedAt: string | null;
|
|
1217
|
+
completedBy: LibraryCompleter | null;
|
|
1218
|
+
note: string | null;
|
|
1219
|
+
}
|
|
1220
|
+
/** Where a scheduled routine stands today. */
|
|
1221
|
+
interface LibraryRoutineState {
|
|
1222
|
+
/** The latest due day on or before today, or null when none falls in the lookback. */
|
|
1223
|
+
current: LibraryOccurrence | null;
|
|
1224
|
+
/** YYYY-MM-DD, or null when no due day falls within a year. */
|
|
1225
|
+
nextDueOn: string | null;
|
|
1226
|
+
/** Missed and still unrecorded occurrences (since tracking began, at most 45 days back). */
|
|
1227
|
+
missedCount: number;
|
|
1228
|
+
}
|
|
1229
|
+
/** The result of `admin.completeLibraryOccurrence()`. */
|
|
1230
|
+
interface LibraryOccurrenceRecorded {
|
|
1231
|
+
ok: true;
|
|
1232
|
+
occurrence: LibraryOccurrence;
|
|
1233
|
+
}
|
|
1234
|
+
/** A library document as listed by `admin.listLibrary()`. Never includes the body. */
|
|
1235
|
+
interface LibraryDocumentSummary {
|
|
1236
|
+
slug: string;
|
|
1237
|
+
title: string;
|
|
1238
|
+
summary: string;
|
|
1239
|
+
kind: LibraryKind;
|
|
1240
|
+
/** The permissions that may read this document (any one of them suffices). */
|
|
1241
|
+
audience: AdminPermission[];
|
|
1242
|
+
owner: string;
|
|
1243
|
+
/** How often a routine is carried out, coarsely; null when the document has no schedule. */
|
|
1244
|
+
cadence: LibraryCadence | null;
|
|
1245
|
+
/** When the routine is due; null when the document has no schedule. */
|
|
1246
|
+
schedule: LibrarySchedule | null;
|
|
1247
|
+
/**
|
|
1248
|
+
* Where the routine stands today. Null for an unscheduled document, and also when the worker
|
|
1249
|
+
* cannot read routine state at the moment (the document itself is still served).
|
|
1250
|
+
*/
|
|
1251
|
+
routine: LibraryRoutineState | null;
|
|
1252
|
+
/** How often the document itself must be re-checked. */
|
|
1253
|
+
reviewEveryDays: number;
|
|
1254
|
+
/** YYYY-MM-DD. */
|
|
1255
|
+
lastReviewed: string;
|
|
1256
|
+
/** YYYY-MM-DD: `lastReviewed` plus `reviewEveryDays`. */
|
|
1257
|
+
reviewDueOn: string;
|
|
1258
|
+
/** True once `reviewDueOn` has passed. */
|
|
1259
|
+
reviewOverdue: boolean;
|
|
1260
|
+
}
|
|
1261
|
+
/** One library document with its markdown body, from `admin.getLibraryDocument()`. */
|
|
1262
|
+
interface LibraryDocument extends LibraryDocumentSummary {
|
|
1263
|
+
markdown: string;
|
|
1264
|
+
/** Recent occurrences, newest first, starting with the next due day. Empty when unscheduled. */
|
|
1265
|
+
occurrences: LibraryOccurrence[];
|
|
1266
|
+
/** True when the caller's role is in the audience, so they may record occurrences as done. */
|
|
1267
|
+
can_record: boolean;
|
|
1268
|
+
}
|
|
1269
|
+
interface LibraryListing {
|
|
1270
|
+
/** Only the documents the caller may read. */
|
|
1271
|
+
documents: LibraryDocumentSummary[];
|
|
1272
|
+
/** True when the caller holds `library:read_all` and so sees every document. */
|
|
1273
|
+
can_read_all: boolean;
|
|
1274
|
+
}
|
|
1160
1275
|
|
|
1161
1276
|
interface AuthTokens {
|
|
1162
1277
|
access_token: string;
|
|
@@ -4329,6 +4444,29 @@ declare class AdminModule {
|
|
|
4329
4444
|
ok: true;
|
|
4330
4445
|
kid: string;
|
|
4331
4446
|
}>;
|
|
4447
|
+
/**
|
|
4448
|
+
* The library documents the caller may read: summaries only, never bodies. Any operator may call
|
|
4449
|
+
* this; each document's `audience` decides whether it is listed. `can_read_all` is true for a
|
|
4450
|
+
* caller holding `library:read_all`, who sees every document.
|
|
4451
|
+
*/
|
|
4452
|
+
listLibrary(options?: RequestOptions): Promise<LibraryListing>;
|
|
4453
|
+
/**
|
|
4454
|
+
* One library document with its markdown body. A document the caller may not read is reported
|
|
4455
|
+
* exactly like one that does not exist (404).
|
|
4456
|
+
*/
|
|
4457
|
+
getLibraryDocument(slug: string, options?: RequestOptions): Promise<LibraryDocument>;
|
|
4458
|
+
/**
|
|
4459
|
+
* Record one occurrence of a scheduled routine as done, with an optional note (at most 500
|
|
4460
|
+
* characters). Only an operator whose role is in the document's audience may record it
|
|
4461
|
+
* (`LibraryDocument.can_record`); the librarian's `library:read_all` alone is not enough.
|
|
4462
|
+
*
|
|
4463
|
+
* `dueOn` (YYYY-MM-DD) must be one of the routine's due days, no more than 45 days old and no
|
|
4464
|
+
* further ahead than its notice. Errors: 403 not in the audience, 404 not readable, 409 already
|
|
4465
|
+
* recorded (the body carries the existing `occurrence`), 422 `invalid_occurrence` with a `reason`
|
|
4466
|
+
* (`not_scheduled`, `not_a_due_day`, `too_early`, `too_old`). Recorded on the audit trail as
|
|
4467
|
+
* `library.routine.completed`.
|
|
4468
|
+
*/
|
|
4469
|
+
completeLibraryOccurrence(slug: string, dueOn: string, note?: string, options?: RequestOptions): Promise<LibraryOccurrenceRecorded>;
|
|
4332
4470
|
listPayoutsAwaitingApproval(options?: RequestOptions): Promise<{
|
|
4333
4471
|
payouts: PendingPayoutApproval[];
|
|
4334
4472
|
}>;
|
|
@@ -4807,4 +4945,4 @@ declare class MitumbaClient {
|
|
|
4807
4945
|
isAuthenticated(): Promise<boolean>;
|
|
4808
4946
|
}
|
|
4809
4947
|
|
|
4810
|
-
export { APIClient, APIError, type APIErrorResponse, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminReport, type AdminRolePreset, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutStatus, type CheckoutStatusResponse, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type Jwk, type Jwks, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportReason, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type ShareUrlOptions, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreResolveThreadInput, type StoreReviewsPage, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isConsentRequired, isMessagingAPIError, isValidPhone, listingShareUrl, maskPhone, normalizePhone, regionById, storeShareUrl };
|
|
4948
|
+
export { APIClient, APIError, type APIErrorResponse, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminReport, type AdminRolePreset, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutStatus, type CheckoutStatusResponse, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type Jwk, type Jwks, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportReason, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type ShareUrlOptions, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreResolveThreadInput, type StoreReviewsPage, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isConsentRequired, isMessagingAPIError, isValidPhone, listingShareUrl, maskPhone, normalizePhone, regionById, storeShareUrl };
|
package/dist/index.js
CHANGED
|
@@ -2471,6 +2471,40 @@ var AdminModule = class {
|
|
|
2471
2471
|
async rotateOidcSigningKey(options) {
|
|
2472
2472
|
return this.client.post("/auth/oidc/keys/rotate", void 0, options);
|
|
2473
2473
|
}
|
|
2474
|
+
// ── Operations library ──
|
|
2475
|
+
/**
|
|
2476
|
+
* The library documents the caller may read: summaries only, never bodies. Any operator may call
|
|
2477
|
+
* this; each document's `audience` decides whether it is listed. `can_read_all` is true for a
|
|
2478
|
+
* caller holding `library:read_all`, who sees every document.
|
|
2479
|
+
*/
|
|
2480
|
+
async listLibrary(options) {
|
|
2481
|
+
return this.client.get("/admin/library", void 0, options);
|
|
2482
|
+
}
|
|
2483
|
+
/**
|
|
2484
|
+
* One library document with its markdown body. A document the caller may not read is reported
|
|
2485
|
+
* exactly like one that does not exist (404).
|
|
2486
|
+
*/
|
|
2487
|
+
async getLibraryDocument(slug, options) {
|
|
2488
|
+
return this.client.get(`/admin/library/${encodeURIComponent(slug)}`, void 0, options);
|
|
2489
|
+
}
|
|
2490
|
+
/**
|
|
2491
|
+
* Record one occurrence of a scheduled routine as done, with an optional note (at most 500
|
|
2492
|
+
* characters). Only an operator whose role is in the document's audience may record it
|
|
2493
|
+
* (`LibraryDocument.can_record`); the librarian's `library:read_all` alone is not enough.
|
|
2494
|
+
*
|
|
2495
|
+
* `dueOn` (YYYY-MM-DD) must be one of the routine's due days, no more than 45 days old and no
|
|
2496
|
+
* further ahead than its notice. Errors: 403 not in the audience, 404 not readable, 409 already
|
|
2497
|
+
* recorded (the body carries the existing `occurrence`), 422 `invalid_occurrence` with a `reason`
|
|
2498
|
+
* (`not_scheduled`, `not_a_due_day`, `too_early`, `too_old`). Recorded on the audit trail as
|
|
2499
|
+
* `library.routine.completed`.
|
|
2500
|
+
*/
|
|
2501
|
+
async completeLibraryOccurrence(slug, dueOn, note, options) {
|
|
2502
|
+
return this.client.post(
|
|
2503
|
+
`/admin/library/${encodeURIComponent(slug)}/occurrences/${encodeURIComponent(dueOn)}/complete`,
|
|
2504
|
+
note ? { note } : {},
|
|
2505
|
+
options
|
|
2506
|
+
);
|
|
2507
|
+
}
|
|
2474
2508
|
// ── Payout approval ──
|
|
2475
2509
|
async listPayoutsAwaitingApproval(options) {
|
|
2476
2510
|
return this.client.get("/admin/payouts/pending-approval", void 0, options);
|