@iotexproject/kit 0.2.13 → 0.2.15

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +140 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -9095,6 +9095,7 @@ export type Proposal = {
9095
9095
  title: string;
9096
9096
  content: string;
9097
9097
  status: string;
9098
+ repo_status?: string | null;
9098
9099
  total_vote_weight?: number;
9099
9100
  voter_count?: number;
9100
9101
  yes_vote_count?: number;
@@ -9114,6 +9115,70 @@ export type Proposal = {
9114
9115
  vote_count?: string | null;
9115
9116
  vote_result?: "passed" | "rejected" | "closed" | null;
9116
9117
  };
9118
+ export type ProposalV2 = {
9119
+ id: number;
9120
+ iip_key: string;
9121
+ iip_number: number | null;
9122
+ title: string | null;
9123
+ slug: string;
9124
+ creator?: string | null;
9125
+ content: string;
9126
+ status: string | null;
9127
+ repo_status: string | null;
9128
+ governance_status: string | null;
9129
+ created_at: string;
9130
+ updated_at: string;
9131
+ start_time?: string | null;
9132
+ end_time?: string | null;
9133
+ is_draft?: boolean;
9134
+ created_date: string | null;
9135
+ synced_at: string;
9136
+ authors: string | null;
9137
+ type: string | null;
9138
+ category: string | null;
9139
+ discussions_to: string | null;
9140
+ abstract: string | null;
9141
+ source_url: string;
9142
+ total_vote_weight?: number | null;
9143
+ voter_count?: number | null;
9144
+ yes_vote_count?: number | null;
9145
+ yes_vote_weight?: number | null;
9146
+ no_vote_count?: number | null;
9147
+ no_vote_weight?: number | null;
9148
+ abstain_vote_count?: number | null;
9149
+ abstain_vote_weight?: number | null;
9150
+ votes?: Vote[];
9151
+ currentUser?: CurrentUser;
9152
+ vote_count?: string | null;
9153
+ vote_result?: "passed" | "rejected" | "closed" | null;
9154
+ };
9155
+ export type ProposalListItemV2 = {
9156
+ id: number | null;
9157
+ iip_number: number | null;
9158
+ iip_key: string;
9159
+ title: string | null;
9160
+ creator?: string | null;
9161
+ status: string | null;
9162
+ repo_status: string | null;
9163
+ created_at: string;
9164
+ updated_at: string;
9165
+ end_time?: string | null;
9166
+ start_time?: string | null;
9167
+ slug: string;
9168
+ vote_count?: string | null;
9169
+ proposal_id?: number | null;
9170
+ vote_result?: "passed" | "rejected" | "closed" | null;
9171
+ };
9172
+ export type IipProposalForVote = {
9173
+ id: number;
9174
+ iip_number: number;
9175
+ title: string | null;
9176
+ slug: string;
9177
+ content: string;
9178
+ governance_status: string | null;
9179
+ start_time: string | null;
9180
+ end_time: string | null;
9181
+ };
9117
9182
  export type CurrentUser = {
9118
9183
  voter?: string;
9119
9184
  is_voted: boolean;
@@ -9161,16 +9226,90 @@ declare class Dao extends BaseDBModule {
9161
9226
  message: string;
9162
9227
  signature: string;
9163
9228
  proposal_id?: number;
9229
+ iip_number?: number;
9164
9230
  proposal_title?: string;
9165
9231
  }): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9166
9232
  createProposal(args: {
9233
+ iip_number: number;
9167
9234
  title: string;
9168
9235
  content: string;
9169
9236
  message: string;
9170
9237
  signature: string;
9171
9238
  start_time: string;
9172
9239
  end_time: string;
9173
- }): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9240
+ }): Promise<import("postgres").Row>;
9241
+ syncProposal(args?: {
9242
+ payload?: Record<string, any>;
9243
+ deliveryId?: string;
9244
+ eventName?: string;
9245
+ repoOwner?: string;
9246
+ repoName?: string;
9247
+ ref?: string | null;
9248
+ pathCsv?: string | null;
9249
+ paths?: string[];
9250
+ githubToken?: string | null;
9251
+ useAi?: boolean;
9252
+ dryRun?: boolean;
9253
+ }): Promise<{
9254
+ sourceRepo: string;
9255
+ ref: string;
9256
+ processed: number;
9257
+ dryRun: boolean;
9258
+ rows: {
9259
+ path: string;
9260
+ sha: string;
9261
+ iipKey: string;
9262
+ title: string | null;
9263
+ deleted?: boolean;
9264
+ action: "upserted" | "deleted" | "dry_run";
9265
+ }[];
9266
+ } | {
9267
+ sourceRepo: string;
9268
+ ref: any;
9269
+ deliveryId: string | null;
9270
+ changedPaths: string[];
9271
+ deletedPaths: string[];
9272
+ processed: number;
9273
+ fullSyncTriggered: boolean;
9274
+ dryRun: boolean;
9275
+ rows: {
9276
+ path: string;
9277
+ sha: string;
9278
+ iipKey: string;
9279
+ title: string | null;
9280
+ deleted?: boolean;
9281
+ action: "upserted" | "deleted" | "dry_run";
9282
+ }[];
9283
+ }>;
9284
+ getProposalForVoteV2({ iip_number, proposal_title }: {
9285
+ iip_number?: number;
9286
+ proposal_title?: string;
9287
+ }): Promise<IipProposalForVote>;
9288
+ getDraftProposalList(args: {
9289
+ page: number;
9290
+ pageSize: number;
9291
+ }): Promise<{
9292
+ data: ProposalListItemV2[] & Iterable<ProposalListItemV2> & import("postgres").ResultQueryMeta<number, keyof ProposalListItemV2>;
9293
+ total: number;
9294
+ }>;
9295
+ getProposalListV2(args: {
9296
+ status?: string;
9297
+ page?: number;
9298
+ pageSize?: number;
9299
+ }): Promise<{
9300
+ data: ProposalListItemV2[] & Iterable<ProposalListItemV2> & import("postgres").ResultQueryMeta<number, keyof ProposalListItemV2>;
9301
+ total: number;
9302
+ }>;
9303
+ getVotesByProposalIdV2({ proposal_id, iip_number, }: {
9304
+ proposal_id?: number;
9305
+ iip_number?: number;
9306
+ }): Promise<Vote[]>;
9307
+ getProposalV2({ id, iip_number, voter, title }: {
9308
+ id?: number;
9309
+ iip_number?: number;
9310
+ voter?: string;
9311
+ title?: string;
9312
+ }): Promise<ProposalV2>;
9174
9313
  }
9175
9314
  export type ProfileMeta = {
9176
9315
  name: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@iotexproject/kit",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "0.2.13",
5
+ "version": "0.2.15",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {