cli

Command-line interface for Radroots
git clone https://radroots.dev/git/cli.git
Log | Files | Refs | README | LICENSE

listing.rs (3237B)


      1 use super::{ApprovalPolicy, OperationRole, OperationSpec, RiskLevel};
      2 
      3 pub const LISTING_CREATE: OperationSpec = operation!(
      4     "listing.create",
      5     "radroots listing create",
      6     "listing",
      7     "listing_create",
      8     "ListingCreateRequest",
      9     "ListingCreateResult",
     10     "Create seller-owned listing/offer.",
     11     Seller,
     12     true,
     13     None,
     14     Medium,
     15     false,
     16     true
     17 );
     18 
     19 pub const LISTING_GET: OperationSpec = operation!(
     20     "listing.get",
     21     "radroots listing get",
     22     "listing",
     23     "listing_get",
     24     "ListingGetRequest",
     25     "ListingGetResult",
     26     "Get seller-owned listing/offer.",
     27     Seller,
     28     false,
     29     None,
     30     Low,
     31     false,
     32     false
     33 );
     34 
     35 pub const LISTING_LIST: OperationSpec = operation!(
     36     "listing.list",
     37     "radroots listing list",
     38     "listing",
     39     "listing_list",
     40     "ListingListRequest",
     41     "ListingListResult",
     42     "List seller-owned listings/offers.",
     43     Seller,
     44     false,
     45     None,
     46     Low,
     47     true,
     48     false
     49 );
     50 
     51 pub const LISTING_APP_LIST: OperationSpec = operation!(
     52     "listing.app.list",
     53     "radroots listing app list",
     54     "listing",
     55     "listing_app_list",
     56     "ListingAppListRequest",
     57     "ListingAppListResult",
     58     "List app-authored shared local listing records.",
     59     Seller,
     60     false,
     61     None,
     62     Low,
     63     false,
     64     false
     65 );
     66 
     67 pub const LISTING_APP_EXPORT: OperationSpec = operation!(
     68     "listing.app.export",
     69     "radroots listing app export",
     70     "listing",
     71     "listing_app_export",
     72     "ListingAppExportRequest",
     73     "ListingAppExportResult",
     74     "Export an app-authored shared listing record as a CLI draft.",
     75     Seller,
     76     true,
     77     None,
     78     Medium,
     79     false,
     80     true
     81 );
     82 
     83 pub const LISTING_UPDATE: OperationSpec = operation!(
     84     "listing.update",
     85     "radroots listing update",
     86     "listing",
     87     "listing_update",
     88     "ListingUpdateRequest",
     89     "ListingUpdateResult",
     90     "Update general listing fields.",
     91     Seller,
     92     true,
     93     Required,
     94     High,
     95     false,
     96     true
     97 );
     98 
     99 pub const LISTING_VALIDATE: OperationSpec = operation!(
    100     "listing.validate",
    101     "radroots listing validate",
    102     "listing",
    103     "listing_validate",
    104     "ListingValidateRequest",
    105     "ListingValidateResult",
    106     "Validate listing for publication or orderability.",
    107     Seller,
    108     false,
    109     None,
    110     Low,
    111     false,
    112     false
    113 );
    114 
    115 pub const LISTING_REBIND: OperationSpec = operation!(
    116     "listing.rebind",
    117     "radroots listing rebind",
    118     "listing",
    119     "listing_rebind",
    120     "ListingRebindRequest",
    121     "ListingRebindResult",
    122     "Rebind a listing draft to an explicit seller actor.",
    123     Seller,
    124     true,
    125     Required,
    126     High,
    127     false,
    128     true
    129 );
    130 
    131 pub const LISTING_PUBLISH: OperationSpec = operation!(
    132     "listing.publish",
    133     "radroots listing publish",
    134     "listing",
    135     "listing_publish",
    136     "ListingPublishRequest",
    137     "ListingPublishResult",
    138     "Publish listing externally.",
    139     Seller,
    140     true,
    141     Required,
    142     High,
    143     false,
    144     true
    145 );
    146 
    147 pub const LISTING_ARCHIVE: OperationSpec = operation!(
    148     "listing.archive",
    149     "radroots listing archive",
    150     "listing",
    151     "listing_archive",
    152     "ListingArchiveRequest",
    153     "ListingArchiveResult",
    154     "Archive listing resource.",
    155     Seller,
    156     true,
    157     Required,
    158     High,
    159     false,
    160     true
    161 );