@appgrowstack/app-contract 0.0.0-stage → 0.1.1
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/CHANGELOG.md +10 -0
- package/LICENSE +21 -0
- package/README.md +50 -2
- package/dist/access.d.ts +890 -0
- package/dist/access.js +126 -0
- package/dist/audience.d.ts +3 -0
- package/dist/audience.js +1 -0
- package/dist/client.d.ts +53 -0
- package/dist/client.js +99 -0
- package/dist/creatives.d.ts +227 -0
- package/dist/creatives.js +62 -0
- package/dist/events.d.ts +12 -0
- package/dist/events.js +21 -0
- package/dist/generated/schema.d.ts +24880 -0
- package/dist/generated/schema.js +4 -0
- package/dist/generated/schemas.d.ts +1 -0
- package/dist/generated/schemas.js +146 -0
- package/dist/http.d.ts +5041 -0
- package/dist/http.js +465 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/ledger.d.ts +4 -0
- package/dist/ledger.js +18 -0
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.js +78 -0
- package/dist/operations.d.ts +53 -0
- package/dist/operations.js +205 -0
- package/dist/registry.d.ts +3 -0
- package/dist/registry.js +15 -0
- package/dist/reviews.d.ts +3 -0
- package/dist/reviews.js +2 -0
- package/dist/rpc.d.ts +901 -0
- package/dist/rpc.js +110 -0
- package/dist/sessions.d.ts +8 -0
- package/dist/sessions.js +8 -0
- package/dist/signals.d.ts +10 -0
- package/dist/signals.js +49 -0
- package/package.json +42 -4
package/dist/access.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export const ROLES = ["owner", "admin", "editor", "support", "viewer", "billing"];
|
|
2
|
+
export const AGENT_FORBIDDEN_ROLES = ["owner", "admin", "billing"];
|
|
3
|
+
export const PERMISSION_GROUPS = ["read", "create", "stop", "outward", "settings"];
|
|
4
|
+
export const APPROVAL_TIERS = ["policy", "reviewer", "human"];
|
|
5
|
+
export const AGENT_KINDS = ["maker", "reviewer"];
|
|
6
|
+
export const REVIEWER_REJECT_PERMISSIONS = ["notify.variant.reject", "support.draft.reject"];
|
|
7
|
+
const Y = "yes";
|
|
8
|
+
const N = "no";
|
|
9
|
+
function roles(owner, admin, editor, support, viewer, billing = N) {
|
|
10
|
+
return { owner, admin, editor, support, viewer, billing };
|
|
11
|
+
}
|
|
12
|
+
export const permissions = {
|
|
13
|
+
"registry.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: null, note: "一覧・詳細・export・doctor・health・承認待ちの一覧(KD-1)" },
|
|
14
|
+
"campaigns.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "組の履歴・simulate の数・件ごとの結果(KD-2)・戻す前の差(書かない。戻すのは campaigns.rollback)" },
|
|
15
|
+
"notify.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "案・施策・週の流れの結果・preview の数・配信の数(KD-3)" },
|
|
16
|
+
"links.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "リンク・押された数・流入元ごとの数(KD-5)" },
|
|
17
|
+
"people.aggregate.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "段階1: 数だけ(人の数・KD-4 の summary)" },
|
|
18
|
+
"people.person.read": { group: "read", roles: roles(Y, Y, Y, Y, N), ai: "local_only", approval: "audit", level: 2, note: "段階2: 人ごとの値・explain の跡・人の検索(KD-4 の find)" },
|
|
19
|
+
"support.aggregate.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "段階1: 問い合わせの数だけ(MG-5 の summary)。本文と端末の文脈は入れない" },
|
|
20
|
+
"support.ticket.list": { group: "read", roles: roles(Y, Y, N, Y, N), ai: "yes", approval: "none", level: 2, note: "段階2: 状態・端末の文脈・題の無い一覧" },
|
|
21
|
+
"support.ticket.read": { group: "read", roles: roles(Y, N, N, Y, N), ai: "local_only", approval: "audit_each", level: 3, note: "段階3: 本文・下書き" },
|
|
22
|
+
"support.attachment.read": { group: "read", roles: roles(Y, N, N, Y, N), ai: "local_only", approval: "audit_each", level: 3, note: "段階3: 添付の画像" },
|
|
23
|
+
"support.review.read": { group: "read", roles: roles(Y, Y, N, Y, N), ai: "yes", approval: "audit", level: 2, note: "K11: ストアのレビューと下書き。文はストアで公開だが利用者が書いた物なので段階2で監査に残す。書いた人の名前は持たない" },
|
|
24
|
+
"support.feedback.read": { group: "read", roles: roles(Y, Y, N, Y, N), ai: "local_only", approval: "audit_each", level: 3, note: "段階3: アンケートの文の話題ごとの数と例の文(人の id は返さない)" },
|
|
25
|
+
"audit.read": { group: "read", roles: roles(Y, Y, N, N, N), ai: "yes", approval: "none", level: null, note: "audit_event の一覧" },
|
|
26
|
+
"access.approval.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: null, note: "承認の依頼の一覧と1件(app-playbook の Worker が5分ごとに読む)。access-control.md 9.1節の「access.approval の一覧を読む」を操作の名前にした" },
|
|
27
|
+
"access.member.read": { group: "read", roles: roles(Y, N, N, N, N), ai: "no", approval: "none", level: null, note: "メンバーの一覧(listMembers)。書く操作(access.member.write)と分け、人が2人以上の組織でも一覧が承認の依頼にならない" },
|
|
28
|
+
"access.agent.read": { group: "read", roles: roles(Y, N, N, N, N), ai: "no", approval: "none", level: null, note: "エージェントの一覧(listAgents)" },
|
|
29
|
+
"sessions.aggregate.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "R8: マップ・流れ・つまずく所の表・週のまとめ・セッションの課題の一覧" },
|
|
30
|
+
"sessions.person.read": { group: "read", roles: roles(Y, Y, Y, Y, N), ai: "local_only", approval: "audit", level: 2, note: "R8: 1人のセッションの出来事の列・マーク・要約・一覧" },
|
|
31
|
+
"sessions.replay.read": { group: "read", roles: roles(Y, N, N, Y, N), ai: "local_only", approval: "audit_each", level: 3, note: "R8: 録画のコマを見る・書き出す・代表のコマ" },
|
|
32
|
+
"sessions.live.watch": { group: "read", roles: roles(Y, N, N, Y, N), ai: "no", approval: "audit_each", level: 3, note: "R8: ライブを頼む・見る" },
|
|
33
|
+
"config.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "R9 と中核: 組の履歴・実験の一覧と1つの実験の数・人数の見積もり" },
|
|
34
|
+
"releases.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "R11: バージョンの一覧と1つ・タイムライン・requires の解決・変更の一覧・GitHub から取り込んだ作業" },
|
|
35
|
+
"creatives.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "R12: 撮影の組・デザイントークン・ページ・ストアの文字・案・実験・数・タグの効果・キーワード・手で行う手順・週の流れ・参考の素材。仮説と学んだことは ledger.read" },
|
|
36
|
+
"insights.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "R13: 指標の値と前後・検知・指摘・週の表(数だけ。人ごとの行は返さない)" },
|
|
37
|
+
"insights.sql": { group: "read", roles: roles(Y, Y, Y, N, Y), ai: "yes", approval: "audit_each", level: 3, note: "R13: データレイクへの読むだけの SQL。1回ごとに insights_query と監査に残す。トークンに絞って出す" },
|
|
38
|
+
"acq.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "獲得: チャネルの登録・チャネルの表・ノードの表(数だけ。人ごとの行は返さない)" },
|
|
39
|
+
"ledger.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "R13: 仮説の記録(仮説・つながり・学んだこと・ナレッジの検索)" },
|
|
40
|
+
"notify.plan.check": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: null, note: "R5: 施策の決まりと文面の案を確かめるだけ(書かない)。送るのは notify.plan.push" },
|
|
41
|
+
"legal.check": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: null, note: "法務のページの製品のデータを送り先で確かめるだけ(書かない)。送るのは legal.push" },
|
|
42
|
+
"links.create": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "" },
|
|
43
|
+
"registry.device.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "本人とテスターの端末" },
|
|
44
|
+
"registry.project.icon": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "アプリのアイコンを上げる・App Store から取り直す。公開の絵なので監査だけ" },
|
|
45
|
+
"support.redraft": { group: "create", roles: roles(Y, N, N, Y, N), ai: "yes", approval: "audit", level: null, note: "AI の下書きを作り直させる(問い合わせ・ストアのレビュー)" },
|
|
46
|
+
"sessions.summarize": { group: "create", roles: roles(Y, Y, Y, Y, N), ai: "yes", approval: "audit", level: 2, note: "R8: 要約を作らせる(お金がかかる)" },
|
|
47
|
+
"sessions.keep": { group: "create", roles: roles(Y, Y, Y, Y, N), ai: "yes", approval: "audit", level: 2, note: "R8: 長く残す" },
|
|
48
|
+
"sessions.review": { group: "create", roles: roles(Y, Y, Y, Y, N), ai: "yes", approval: "audit", level: 2, note: "R8: 読んだ記録(時刻と短いメモ)を付ける・セッションの課題を作る・変える・結ぶ" },
|
|
49
|
+
"releases.sync": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R11: ストアと GitHub の同期をすぐ回す。どちらも読むだけ" },
|
|
50
|
+
"registry.run.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R1: 定期実行の1回を始める・終える・やめた定期実行を消す(launchd・クラウドの定期実行が app-growth runs で返す)" },
|
|
51
|
+
"releases.manifest.push": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R11: ビルドのマニフェストを送る。解決が変わった組は core が作り、監査は sys:releases" },
|
|
52
|
+
"releases.week.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R11: 今週のリリースの計画とステップを書く(app-release week run)。止める条件は core が決める" },
|
|
53
|
+
"releases.change.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R11: 変更を作る・直す・判定の結果を書く・消す" },
|
|
54
|
+
"creatives.capture.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: 撮影の組を作る・上げ終える" },
|
|
55
|
+
"creatives.brand.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: デザイントークンと声の決まりを送る・フォントと素材を上げる" },
|
|
56
|
+
"creatives.page.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: 既定のページ・CPP・Play のカスタムの掲載を登録する" },
|
|
57
|
+
"creatives.text.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: ストアの文字の案を足す・落とす" },
|
|
58
|
+
"creatives.variant.generate": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: 案を作らせる(お金がかかる。予算で止めている時は 409 budget_stop)" },
|
|
59
|
+
"creatives.keyword.sync": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: キーワードの人気度をすぐ読む" },
|
|
60
|
+
"creatives.step.complete": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: 手で行う手順の結果を書く" },
|
|
61
|
+
"creatives.run": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: 週の流れをすぐ回す" },
|
|
62
|
+
"creatives.reference.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: 参考の素材を足す・ファイルを上げる・メモとタグとつなぐ先を直す。外に何も出さない" },
|
|
63
|
+
"campaigns.bundle.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "リモート画面のバンドルを R2 に上げる。中身の sha256 の名前で置くので、組(campaigns push)が指すまで端末には出ない" },
|
|
64
|
+
"insights.collect": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R13: 外の数の取り込みをすぐ回す" },
|
|
65
|
+
"insights.kpi.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R13: 製品の KPI の木を置き換える・KPI の値を数え直す" },
|
|
66
|
+
"acq.channel.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "獲得: チャネルを登録する・直す・止める" },
|
|
67
|
+
"acq.post.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "獲得: channel の repo から投稿の予約と出した記録を送る。決まり content.posts_per_account_day を超える予約は core が断る" },
|
|
68
|
+
"ledger.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R13: 仮説を足す・直す・当てた日を書く・学んだことを足す。outcome は書けない" },
|
|
69
|
+
"campaigns.stop": { group: "stop", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "notify_after", level: null, note: "" },
|
|
70
|
+
"notify.campaign.stop": { group: "stop", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "notify_after", level: null, note: "" },
|
|
71
|
+
"notify.variant.reject": { group: "stop", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "notify_after", level: null, note: "" },
|
|
72
|
+
"notify.variant.retire": { group: "stop", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "notify_after", level: null, note: "" },
|
|
73
|
+
"support.resolve": { group: "stop", roles: roles(Y, N, N, Y, N), ai: "yes", approval: "audit", level: null, note: "" },
|
|
74
|
+
"support.draft.reject": { group: "stop", roles: roles(Y, N, N, Y, N), ai: "yes", approval: "audit", level: null, note: "下書きを却下する(rejectDraft・rejectReviewDraft)。access-control.md 4.3節に無かった道に名前を付けた" },
|
|
75
|
+
"config.stop": { group: "stop", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "notify_after", level: null, note: "中核: 実験を外した組を足す(experiments stop)" },
|
|
76
|
+
"creatives.variant.write": { group: "stop", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: 案を落とす・下ろす" },
|
|
77
|
+
"creatives.test.stop": { group: "stop", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R12: 実験を止める" },
|
|
78
|
+
"campaigns.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "policy", level: null, note: "本番の core。staging は承認の決まりが「なし」" },
|
|
79
|
+
"campaigns.resume": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "policy", level: null, note: "" },
|
|
80
|
+
"campaigns.rollback": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "policy", level: null, note: "" },
|
|
81
|
+
"notify.variant.approve": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "queue", approval: "reviewer", level: null, note: "AI の依頼=案を作る(持ち物の待ち行列)" },
|
|
82
|
+
"notify.campaign.resume": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "policy", level: null, note: "" },
|
|
83
|
+
"support.reply": { group: "outward", roles: roles(Y, N, N, Y, N), ai: "queue", approval: "reviewer", level: null, note: "下書きの approve・自分で返す。AI の依頼=下書き(持ち物の待ち行列)" },
|
|
84
|
+
"support.review.reply": { group: "outward", roles: roles(Y, N, N, Y, N), ai: "request", approval: "reviewer", level: null, note: "K11: ストアのレビューに返事を送る(下書きの approve)。ストアで公開されるので、エージェントが呼ぶと 202 の依頼になり、点検役か本人が承認した本文だけが出る" },
|
|
85
|
+
"help.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "ヘルプの記事の索引" },
|
|
86
|
+
"legal.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "法務のページの製品のデータ(appgrowstack/legal-texts)" },
|
|
87
|
+
"sessions.policy.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "R8: マニフェストを送る(全部の端末の撮る・隠す・送る量が変わる)" },
|
|
88
|
+
"pricing.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "値段の階段とオファーを送る(人に出す値段が変わる)" },
|
|
89
|
+
"segments.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "群れの定義を送る(件とフラグの規則の当たる人が変わる。名指しの群れは人の id を持つ)" },
|
|
90
|
+
"notices.read": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: 1, note: "R14: お知らせの一覧・状態・届いた人と既読の数(人ごとの値は返さない)" },
|
|
91
|
+
"notices.check": { group: "read", roles: roles(Y, Y, Y, Y, Y), ai: "yes", approval: "none", level: null, note: "R14: お知らせを確かめるだけ(書かない)。送るのは notices.push" },
|
|
92
|
+
"notices.image.write": { group: "create", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R14: お知らせの画像を R2 に上げる。中身の sha256 の名前で置くので、お知らせ(notices push)が指すまで端末には出ない" },
|
|
93
|
+
"notices.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "R14: お知らせの一覧を送る(アプリの中に出る。push のお知らせはプッシュも送る)。決まりの確かめに通らない物は送れない。全員への important も点検役が通す(ADR 0055)" },
|
|
94
|
+
"notices.stop": { group: "stop", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "notify_after", level: null, note: "R14: お知らせをその場で一覧から外し、待っているプッシュも止める" },
|
|
95
|
+
"config.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "policy", level: null, note: "R9 と中核: 組を送る・実験を先に決める(全部の端末の値が変わる)" },
|
|
96
|
+
"notify.plan.push": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "R5: 施策の決まりと文面の案を送る(施策を足す・消す。案は承認を待つ)" },
|
|
97
|
+
"creatives.text.approve": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "queue", approval: "reviewer", level: null, note: "R12: ストアの文字を承認して公開する。AI の依頼=文字の案を作る(持ち物の待ち行列)" },
|
|
98
|
+
"creatives.variant.approve": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "queue", approval: "reviewer", level: null, note: "R12: 素材の案を承認して公開する。AI の依頼=案を作る(持ち物の待ち行列)" },
|
|
99
|
+
"creatives.test.write": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "queue", approval: "reviewer", level: null, note: "R12: 実験を決めて始める(広告とストアのページの配り方が変わる)" },
|
|
100
|
+
"creatives.submit": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "queue", approval: "reviewer", level: null, note: "R12: CPP・イベント・素材・PPO の treatment を審査に出す。審査に出した物は取り下げられるので点検役が決める" },
|
|
101
|
+
"insights.finding.decide": { group: "outward", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "R13: 指摘を採る・却下・後で。採ると仮説を作り、基盤の操作の依頼を出す。エージェントは 202 で承認を通す" },
|
|
102
|
+
"registry.project.create": { group: "settings", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "プロジェクトとサーバーキーを作る。止めて作り直せるので点検役が決める" },
|
|
103
|
+
"registry.project.update": { group: "settings", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "features・status・web_domain・support_email" },
|
|
104
|
+
"registry.app.write": { group: "settings", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "" },
|
|
105
|
+
"registry.budget.write": { group: "settings", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "policy", level: null, note: "1人に触れる回数の上限。schema の上限の内なら決まりで通す。上限そのものを変えるのは決まりを変えること" },
|
|
106
|
+
"registry.cost.write": { group: "settings", roles: roles(Y, Y, N, N, N, Y), ai: "yes", approval: "audit", level: null, note: "R1: アカウントの契約の固定費を書く・消す。費用の表に並べるだけで、払う物は変わらない" },
|
|
107
|
+
"registry.policy.write": { group: "settings", roles: roles(Y, Y, N, N, N), ai: "request", approval: "human", level: null, note: "R1: 事業の決まり(policy)を書く・消す。決まりを変えるのは AI の権限を広げることなので本人が決める(ADR 0053)" },
|
|
108
|
+
"registry.org.write": { group: "settings", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "R1: 組織の目標を書く。AI の権限は広げないので点検役が決める" },
|
|
109
|
+
"registry.account.write": { group: "settings", roles: roles(Y, Y, Y, N, N), ai: "yes", approval: "audit", level: null, note: "R1: 組織のアカウントの一覧を書く・消す。名前と状態だけで秘密の値を持たない" },
|
|
110
|
+
"keys.create": { group: "settings", roles: roles(Y, Y, N, N, N), ai: "request", approval: "human", level: null, note: "pk_・sk_。鍵を出すので本人" },
|
|
111
|
+
"keys.revoke": { group: "settings", roles: roles(Y, Y, Y, N, N), ai: "request", approval: "reviewer", level: null, note: "pk_・sk_。権限を狭める側なので点検役" },
|
|
112
|
+
"people.forget": { group: "settings", roles: roles(Y, N, N, Y, N), ai: "request", approval: "policy", level: 2, note: "管理の道からの手での削除。応える義務があり決めることが無いので決まりで通し、監査に残す。利用者の操作の forget(RPC)は承認を通さない" },
|
|
113
|
+
"access.member.write": { group: "settings", roles: roles(Y, N, N, N, N), ai: "request", approval: "human", level: null, note: "AI は依頼まで。役割を持たなくても依頼でき、決めるのは本人" },
|
|
114
|
+
"access.agent.write": { group: "settings", roles: roles(Y, N, N, N, N), ai: "request", approval: "human", level: null, note: "エージェントを作る・役割とサービストークンを一緒に結ぶ。AI は依頼まで。決めるのは本人" },
|
|
115
|
+
"access.token.issue": { group: "settings", roles: roles(Y, N, N, N, N), ai: "request_own", approval: "human", level: null, note: "" },
|
|
116
|
+
"access.token.revoke": { group: "settings", roles: roles(Y, N, N, N, N), ai: "own_only", approval: "audit", level: null, note: "" },
|
|
117
|
+
"access.approval.decide": { group: "settings", roles: roles(Y, "if_permitted", "if_permitted", "if_permitted", N), ai: "no", approval: "human_step_up", level: null, note: "依頼の操作の権限を持つ、本人の確認つきの人だけ。依頼した主体と別(1人の組織は self_approved)" },
|
|
118
|
+
"access.policy.write": { group: "settings", roles: roles(Y, N, N, N, N), ai: "request", approval: "human", level: null, note: "承認の決まり(AccessPolicy)。AI は依頼まで。決めるのは本人" },
|
|
119
|
+
"billing.manage": { group: "settings", roles: roles(Y, N, N, N, N, Y), ai: "no", approval: "after_sale", level: null, note: "access-control.md の billing.*。売った後に作る" },
|
|
120
|
+
};
|
|
121
|
+
export const PERMISSION_NAMES = Object.keys(permissions);
|
|
122
|
+
export const LEVEL3_PERMISSIONS = PERMISSION_NAMES.filter((n) => permissions[n].level === 3);
|
|
123
|
+
export const PRINCIPAL_KINDS = ["user", "agent", "service", "system"];
|
|
124
|
+
export const AUDIT_VIA = ["access_email", "user_token", "agent_token", "server_key", "binding", "system", "legacy"];
|
|
125
|
+
export const OWNER_ORG = { id: "org_self000000000000", slug: "taniguchi-kyoichi" };
|
|
126
|
+
export const SYSTEM_PRINCIPALS = ["sys:support-drafter", "sys:notify-weekly", "sys:core-cron", "sys:session-summarizer", "sys:releases", "sys:creatives", "sys:creatives-weekly", "sys:insights-daily"];
|
package/dist/audience.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const AUDIENCES = ["real", "owner", "test", "review", "robot"];
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AccessApprovalNoChange, PendingApproval } from "./generated/schema.js";
|
|
2
|
+
import { coreEndpoints, type CoreTypes } from "./http.js";
|
|
3
|
+
export type CoreOperationName = keyof typeof coreEndpoints & keyof CoreTypes;
|
|
4
|
+
type ParamsOf<P extends string> = P extends `${string}:${infer Name}/${infer Rest}` ? Name | ParamsOf<`/${Rest}`> : P extends `${string}:${infer Name}` ? Name : never;
|
|
5
|
+
type PathInput<N extends CoreOperationName> = [ParamsOf<(typeof coreEndpoints)[N]["path"]>] extends [never] ? {
|
|
6
|
+
path?: undefined;
|
|
7
|
+
} : {
|
|
8
|
+
path: Record<ParamsOf<(typeof coreEndpoints)[N]["path"]>, string>;
|
|
9
|
+
};
|
|
10
|
+
type BodyInput<N extends CoreOperationName> = [CoreTypes[N]["request"]] extends [never] ? {
|
|
11
|
+
body?: undefined;
|
|
12
|
+
} : {
|
|
13
|
+
body: CoreTypes[N]["request"];
|
|
14
|
+
};
|
|
15
|
+
export type QueryValue = string | number | boolean | null | undefined;
|
|
16
|
+
export type CoreCallInput<N extends CoreOperationName> = PathInput<N> & BodyInput<N> & {
|
|
17
|
+
query?: Record<string, QueryValue>;
|
|
18
|
+
};
|
|
19
|
+
export type CoreCallOutput<N extends CoreOperationName> = [CoreTypes[N]["response"]] extends [never] ? undefined : CoreTypes[N]["response"];
|
|
20
|
+
export declare class PendingApprovalError extends Error {
|
|
21
|
+
readonly pending: PendingApproval;
|
|
22
|
+
constructor(pending: PendingApproval);
|
|
23
|
+
}
|
|
24
|
+
export declare class NoChangeError extends Error {
|
|
25
|
+
readonly body: AccessApprovalNoChange;
|
|
26
|
+
constructor(body: AccessApprovalNoChange);
|
|
27
|
+
}
|
|
28
|
+
export declare class CoreError extends Error {
|
|
29
|
+
readonly status: number;
|
|
30
|
+
readonly body: unknown;
|
|
31
|
+
constructor(status: number, body: unknown);
|
|
32
|
+
describe(): string;
|
|
33
|
+
}
|
|
34
|
+
export declare const ACCESS_BLOCKED_MESSAGE = "Access \u306B\u6B62\u3081\u3089\u308C\u305F\uFF08\u30B5\u30FC\u30D3\u30B9\u30C8\u30FC\u30AF\u30F3\u304C\u9055\u3046\u304B\u3001\u30DD\u30EA\u30B7\u30FC\u306B\u5165\u3063\u3066\u3044\u306A\u3044\uFF09";
|
|
35
|
+
export interface CoreClientOptions {
|
|
36
|
+
baseUrl: string;
|
|
37
|
+
fetch?: (input: Request | string, init?: RequestInit) => Promise<Response>;
|
|
38
|
+
headers?: Record<string, string> | (() => Record<string, string>);
|
|
39
|
+
}
|
|
40
|
+
export declare function fillPath(path: string, params?: Record<string, string>): string;
|
|
41
|
+
export declare function queryString(query?: Record<string, QueryValue>): string;
|
|
42
|
+
export declare function readCoreResponse(res: Response): Promise<unknown>;
|
|
43
|
+
export interface CoreClient {
|
|
44
|
+
call<N extends CoreOperationName>(name: N, input: CoreCallInput<N>): Promise<CoreCallOutput<N>>;
|
|
45
|
+
request(name: CoreOperationName, input: {
|
|
46
|
+
path?: Record<string, string>;
|
|
47
|
+
query?: Record<string, QueryValue>;
|
|
48
|
+
body?: RequestInit["body"];
|
|
49
|
+
contentType?: string;
|
|
50
|
+
}): Promise<Response>;
|
|
51
|
+
}
|
|
52
|
+
export declare function createCoreClient(options: CoreClientOptions): CoreClient;
|
|
53
|
+
export {};
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { coreEndpoints } from "./http.js";
|
|
2
|
+
export class PendingApprovalError extends Error {
|
|
3
|
+
pending;
|
|
4
|
+
constructor(pending) {
|
|
5
|
+
super(`承認の依頼 ${pending.approval.id}`);
|
|
6
|
+
this.pending = pending;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class NoChangeError extends Error {
|
|
10
|
+
body;
|
|
11
|
+
constructor(body) {
|
|
12
|
+
super(body.no_change.message);
|
|
13
|
+
this.body = body;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export class CoreError extends Error {
|
|
17
|
+
status;
|
|
18
|
+
body;
|
|
19
|
+
constructor(status, body) {
|
|
20
|
+
super(`HTTP ${status}`);
|
|
21
|
+
this.status = status;
|
|
22
|
+
this.body = body;
|
|
23
|
+
}
|
|
24
|
+
describe() {
|
|
25
|
+
const e = this.body?.error;
|
|
26
|
+
if (!e || typeof e !== "object")
|
|
27
|
+
return `サーバーの誤り(HTTP ${this.status})\n${typeof this.body === "string" ? this.body : JSON.stringify(this.body)}`;
|
|
28
|
+
const lines = [`サーバーの誤り(HTTP ${this.status}・${e.code}): ${e.message}`];
|
|
29
|
+
for (const p of e.problems ?? [])
|
|
30
|
+
lines.push(` ${[p.campaign, p.path].filter(Boolean).join(" ")} ${p.message}`);
|
|
31
|
+
return lines.join("\n");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export const ACCESS_BLOCKED_MESSAGE = "Access に止められた(サービストークンが違うか、ポリシーに入っていない)";
|
|
35
|
+
export function fillPath(path, params = {}) {
|
|
36
|
+
return path.replace(/:([A-Za-z_][A-Za-z0-9_]*)/g, (_, name) => {
|
|
37
|
+
const v = params[name];
|
|
38
|
+
if (v === undefined)
|
|
39
|
+
throw new Error(`道の :${name} が無い(${path})`);
|
|
40
|
+
return encodeURIComponent(v);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export function queryString(query = {}) {
|
|
44
|
+
const q = new URLSearchParams();
|
|
45
|
+
for (const [k, v] of Object.entries(query))
|
|
46
|
+
if (v !== undefined && v !== null)
|
|
47
|
+
q.set(k, String(v));
|
|
48
|
+
const s = q.toString();
|
|
49
|
+
return s ? `?${s}` : "";
|
|
50
|
+
}
|
|
51
|
+
export async function readCoreResponse(res) {
|
|
52
|
+
const text = await res.text();
|
|
53
|
+
let parsed = text;
|
|
54
|
+
try {
|
|
55
|
+
parsed = text ? JSON.parse(text) : undefined;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
}
|
|
59
|
+
if (res.status >= 300 && res.status < 400)
|
|
60
|
+
throw new CoreError(res.status, ACCESS_BLOCKED_MESSAGE);
|
|
61
|
+
if (!res.ok)
|
|
62
|
+
throw new CoreError(res.status, text ? parsed : text);
|
|
63
|
+
if (res.status === 202)
|
|
64
|
+
throw new PendingApprovalError(parsed);
|
|
65
|
+
if (parsed !== null && typeof parsed === "object" && "no_change" in parsed)
|
|
66
|
+
throw new NoChangeError(parsed);
|
|
67
|
+
return parsed;
|
|
68
|
+
}
|
|
69
|
+
export function createCoreClient(options) {
|
|
70
|
+
const base = options.baseUrl.replace(/\/+$/, "");
|
|
71
|
+
const doFetch = options.fetch ?? ((input, init) => globalThis.fetch(input, init));
|
|
72
|
+
const headersOf = () => (typeof options.headers === "function" ? options.headers() : (options.headers ?? {}));
|
|
73
|
+
const urlOf = (name, path, query) => {
|
|
74
|
+
const e = coreEndpoints[name];
|
|
75
|
+
return { method: e.method, url: `${base}${fillPath(e.path, path)}${queryString(query)}` };
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
async call(name, input) {
|
|
79
|
+
const { method, url } = urlOf(name, input.path, input.query);
|
|
80
|
+
const hasBody = input.body !== undefined;
|
|
81
|
+
const init = {
|
|
82
|
+
method,
|
|
83
|
+
headers: { ...headersOf(), ...(hasBody ? { "Content-Type": "application/json" } : {}) },
|
|
84
|
+
redirect: "manual",
|
|
85
|
+
};
|
|
86
|
+
if (hasBody)
|
|
87
|
+
init.body = JSON.stringify(input.body);
|
|
88
|
+
const res = await doFetch(url, init);
|
|
89
|
+
return (await readCoreResponse(res));
|
|
90
|
+
},
|
|
91
|
+
async request(name, input) {
|
|
92
|
+
const { method, url } = urlOf(name, input.path, input.query);
|
|
93
|
+
const init = { method, headers: { ...headersOf(), ...(input.contentType ? { "Content-Type": input.contentType } : {}) }, redirect: "manual" };
|
|
94
|
+
if (input.body !== undefined && input.body !== null)
|
|
95
|
+
init.body = input.body;
|
|
96
|
+
return doFetch(url, init);
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import type { CreativeDevice, CreativeLayout } from "./generated/schema.js";
|
|
2
|
+
export interface CreativeSize {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}
|
|
6
|
+
export interface CreativeSurfaceRule {
|
|
7
|
+
store: "app_store" | "play";
|
|
8
|
+
layouts: readonly CreativeLayout[];
|
|
9
|
+
sizes: Partial<Record<CreativeDevice, CreativeSize>>;
|
|
10
|
+
ratio: string | null;
|
|
11
|
+
min: number;
|
|
12
|
+
max: number;
|
|
13
|
+
format: "jpeg" | "png" | "mp4";
|
|
14
|
+
seconds: {
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
} | null;
|
|
18
|
+
}
|
|
19
|
+
export declare const creativeSurfaces: {
|
|
20
|
+
readonly screenshots: {
|
|
21
|
+
readonly store: "app_store";
|
|
22
|
+
readonly layouts: readonly ["caption_top", "caption_bottom", "hero_full_ui", "panorama"];
|
|
23
|
+
readonly sizes: {
|
|
24
|
+
readonly iphone_69: {
|
|
25
|
+
readonly width: 1320;
|
|
26
|
+
readonly height: 2868;
|
|
27
|
+
};
|
|
28
|
+
readonly iphone_63: {
|
|
29
|
+
readonly width: 1206;
|
|
30
|
+
readonly height: 2622;
|
|
31
|
+
};
|
|
32
|
+
readonly ipad_13: {
|
|
33
|
+
readonly width: 2064;
|
|
34
|
+
readonly height: 2752;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly ratio: null;
|
|
38
|
+
readonly min: 1;
|
|
39
|
+
readonly max: 10;
|
|
40
|
+
readonly format: "jpeg";
|
|
41
|
+
readonly seconds: null;
|
|
42
|
+
};
|
|
43
|
+
readonly app_preview: {
|
|
44
|
+
readonly store: "app_store";
|
|
45
|
+
readonly layouts: readonly ["caption_overlay"];
|
|
46
|
+
readonly sizes: {
|
|
47
|
+
readonly iphone_69: {
|
|
48
|
+
readonly width: 886;
|
|
49
|
+
readonly height: 1920;
|
|
50
|
+
};
|
|
51
|
+
readonly ipad_13: {
|
|
52
|
+
readonly width: 1200;
|
|
53
|
+
readonly height: 1600;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly ratio: null;
|
|
57
|
+
readonly min: 1;
|
|
58
|
+
readonly max: 3;
|
|
59
|
+
readonly format: "mp4";
|
|
60
|
+
readonly seconds: {
|
|
61
|
+
readonly min: 15;
|
|
62
|
+
readonly max: 30;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly header: {
|
|
66
|
+
readonly store: "app_store";
|
|
67
|
+
readonly layouts: readonly ["header"];
|
|
68
|
+
readonly sizes: {};
|
|
69
|
+
readonly ratio: "3840:1646";
|
|
70
|
+
readonly min: 1;
|
|
71
|
+
readonly max: 1;
|
|
72
|
+
readonly format: "png";
|
|
73
|
+
readonly seconds: null;
|
|
74
|
+
};
|
|
75
|
+
readonly search: {
|
|
76
|
+
readonly store: "app_store";
|
|
77
|
+
readonly layouts: readonly ["search"];
|
|
78
|
+
readonly sizes: {};
|
|
79
|
+
readonly ratio: "3:2";
|
|
80
|
+
readonly min: 1;
|
|
81
|
+
readonly max: 1;
|
|
82
|
+
readonly format: "png";
|
|
83
|
+
readonly seconds: null;
|
|
84
|
+
};
|
|
85
|
+
readonly event_card: {
|
|
86
|
+
readonly store: "app_store";
|
|
87
|
+
readonly layouts: readonly ["event_card"];
|
|
88
|
+
readonly sizes: {};
|
|
89
|
+
readonly ratio: "16:9";
|
|
90
|
+
readonly min: 1;
|
|
91
|
+
readonly max: 1;
|
|
92
|
+
readonly format: "jpeg";
|
|
93
|
+
readonly seconds: null;
|
|
94
|
+
};
|
|
95
|
+
readonly event_detail: {
|
|
96
|
+
readonly store: "app_store";
|
|
97
|
+
readonly layouts: readonly ["event_detail"];
|
|
98
|
+
readonly sizes: {};
|
|
99
|
+
readonly ratio: "9:16";
|
|
100
|
+
readonly min: 1;
|
|
101
|
+
readonly max: 1;
|
|
102
|
+
readonly format: "jpeg";
|
|
103
|
+
readonly seconds: null;
|
|
104
|
+
};
|
|
105
|
+
readonly play_phone: {
|
|
106
|
+
readonly store: "play";
|
|
107
|
+
readonly layouts: readonly ["play_phone"];
|
|
108
|
+
readonly sizes: {
|
|
109
|
+
readonly android_phone: {
|
|
110
|
+
readonly width: 1080;
|
|
111
|
+
readonly height: 1920;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly ratio: null;
|
|
115
|
+
readonly min: 2;
|
|
116
|
+
readonly max: 8;
|
|
117
|
+
readonly format: "jpeg";
|
|
118
|
+
readonly seconds: null;
|
|
119
|
+
};
|
|
120
|
+
readonly feature_graphic: {
|
|
121
|
+
readonly store: "play";
|
|
122
|
+
readonly layouts: readonly ["feature_graphic"];
|
|
123
|
+
readonly sizes: {
|
|
124
|
+
readonly android_phone: {
|
|
125
|
+
readonly width: 1024;
|
|
126
|
+
readonly height: 500;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly ratio: null;
|
|
130
|
+
readonly min: 1;
|
|
131
|
+
readonly max: 1;
|
|
132
|
+
readonly format: "png";
|
|
133
|
+
readonly seconds: null;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export interface StoreTextFieldRule {
|
|
137
|
+
stores: readonly ("app_store" | "play")[];
|
|
138
|
+
max: number;
|
|
139
|
+
count: "graphemes" | "bytes";
|
|
140
|
+
review: "version" | "none" | "google" | "event";
|
|
141
|
+
}
|
|
142
|
+
export declare const creativeFields: {
|
|
143
|
+
readonly name: {
|
|
144
|
+
readonly stores: readonly ["app_store", "play"];
|
|
145
|
+
readonly max: 30;
|
|
146
|
+
readonly count: "graphemes";
|
|
147
|
+
readonly review: "version";
|
|
148
|
+
};
|
|
149
|
+
readonly subtitle: {
|
|
150
|
+
readonly stores: readonly ["app_store"];
|
|
151
|
+
readonly max: 30;
|
|
152
|
+
readonly count: "graphemes";
|
|
153
|
+
readonly review: "version";
|
|
154
|
+
};
|
|
155
|
+
readonly keywords: {
|
|
156
|
+
readonly stores: readonly ["app_store"];
|
|
157
|
+
readonly max: 100;
|
|
158
|
+
readonly count: "bytes";
|
|
159
|
+
readonly review: "version";
|
|
160
|
+
};
|
|
161
|
+
readonly promotional_text: {
|
|
162
|
+
readonly stores: readonly ["app_store"];
|
|
163
|
+
readonly max: 170;
|
|
164
|
+
readonly count: "graphemes";
|
|
165
|
+
readonly review: "none";
|
|
166
|
+
};
|
|
167
|
+
readonly description: {
|
|
168
|
+
readonly stores: readonly ["app_store", "play"];
|
|
169
|
+
readonly max: 4000;
|
|
170
|
+
readonly count: "graphemes";
|
|
171
|
+
readonly review: "version";
|
|
172
|
+
};
|
|
173
|
+
readonly whats_new: {
|
|
174
|
+
readonly stores: readonly ["app_store"];
|
|
175
|
+
readonly max: 4000;
|
|
176
|
+
readonly count: "graphemes";
|
|
177
|
+
readonly review: "version";
|
|
178
|
+
};
|
|
179
|
+
readonly short_description: {
|
|
180
|
+
readonly stores: readonly ["play"];
|
|
181
|
+
readonly max: 80;
|
|
182
|
+
readonly count: "graphemes";
|
|
183
|
+
readonly review: "google";
|
|
184
|
+
};
|
|
185
|
+
readonly event_name: {
|
|
186
|
+
readonly stores: readonly ["app_store"];
|
|
187
|
+
readonly max: 30;
|
|
188
|
+
readonly count: "graphemes";
|
|
189
|
+
readonly review: "event";
|
|
190
|
+
};
|
|
191
|
+
readonly event_short: {
|
|
192
|
+
readonly stores: readonly ["app_store"];
|
|
193
|
+
readonly max: 50;
|
|
194
|
+
readonly count: "graphemes";
|
|
195
|
+
readonly review: "event";
|
|
196
|
+
};
|
|
197
|
+
readonly event_long: {
|
|
198
|
+
readonly stores: readonly ["app_store"];
|
|
199
|
+
readonly max: 120;
|
|
200
|
+
readonly count: "graphemes";
|
|
201
|
+
readonly review: "event";
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
export declare const CAPTURE_FILE_MAX_BYTES: number;
|
|
205
|
+
export declare const captureFormats: {
|
|
206
|
+
readonly image: {
|
|
207
|
+
readonly ext: "png";
|
|
208
|
+
readonly contentType: "image/png";
|
|
209
|
+
};
|
|
210
|
+
readonly video: {
|
|
211
|
+
readonly ext: "mp4";
|
|
212
|
+
readonly contentType: "video/mp4";
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
export declare const CREATIVE_ASSET_MAX_BYTES: number;
|
|
216
|
+
export declare const REFERENCE_FILE_MAX_BYTES: number;
|
|
217
|
+
export declare const CREATIVE_ART_ROLES: readonly ["screen_art", "character", "reward_item", "background", "icon", "store_background", "social_frame", "celebration", "screen_video"];
|
|
218
|
+
export declare const CREATIVE_ART_USES: readonly ["paywall", "onboarding", "offer", "celebration", "store_screenshot", "store_header", "social", "in_app", "notification"];
|
|
219
|
+
export declare const CREATIVE_ART_TEXT_MAX: {
|
|
220
|
+
readonly reference: 200;
|
|
221
|
+
readonly method: 80;
|
|
222
|
+
readonly prompt: 4000;
|
|
223
|
+
readonly style: 200;
|
|
224
|
+
};
|
|
225
|
+
export declare const CREATIVE_ART_TAGS_MAX = 30;
|
|
226
|
+
export declare const CREATIVE_ART_VIDEO_ROLE = "screen_video";
|
|
227
|
+
export declare const SCREEN_VIDEO_MAX_BYTES = 2621440;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export const creativeSurfaces = {
|
|
2
|
+
screenshots: {
|
|
3
|
+
store: "app_store",
|
|
4
|
+
layouts: ["caption_top", "caption_bottom", "hero_full_ui", "panorama"],
|
|
5
|
+
sizes: { iphone_69: { width: 1320, height: 2868 }, iphone_63: { width: 1206, height: 2622 }, ipad_13: { width: 2064, height: 2752 } },
|
|
6
|
+
ratio: null,
|
|
7
|
+
min: 1,
|
|
8
|
+
max: 10,
|
|
9
|
+
format: "jpeg",
|
|
10
|
+
seconds: null,
|
|
11
|
+
},
|
|
12
|
+
app_preview: {
|
|
13
|
+
store: "app_store",
|
|
14
|
+
layouts: ["caption_overlay"],
|
|
15
|
+
sizes: { iphone_69: { width: 886, height: 1920 }, ipad_13: { width: 1200, height: 1600 } },
|
|
16
|
+
ratio: null,
|
|
17
|
+
min: 1,
|
|
18
|
+
max: 3,
|
|
19
|
+
format: "mp4",
|
|
20
|
+
seconds: { min: 15, max: 30 },
|
|
21
|
+
},
|
|
22
|
+
header: { store: "app_store", layouts: ["header"], sizes: {}, ratio: "3840:1646", min: 1, max: 1, format: "png", seconds: null },
|
|
23
|
+
search: { store: "app_store", layouts: ["search"], sizes: {}, ratio: "3:2", min: 1, max: 1, format: "png", seconds: null },
|
|
24
|
+
event_card: { store: "app_store", layouts: ["event_card"], sizes: {}, ratio: "16:9", min: 1, max: 1, format: "jpeg", seconds: null },
|
|
25
|
+
event_detail: { store: "app_store", layouts: ["event_detail"], sizes: {}, ratio: "9:16", min: 1, max: 1, format: "jpeg", seconds: null },
|
|
26
|
+
play_phone: {
|
|
27
|
+
store: "play",
|
|
28
|
+
layouts: ["play_phone"],
|
|
29
|
+
sizes: { android_phone: { width: 1080, height: 1920 } },
|
|
30
|
+
ratio: null,
|
|
31
|
+
min: 2,
|
|
32
|
+
max: 8,
|
|
33
|
+
format: "jpeg",
|
|
34
|
+
seconds: null,
|
|
35
|
+
},
|
|
36
|
+
feature_graphic: { store: "play", layouts: ["feature_graphic"], sizes: { android_phone: { width: 1024, height: 500 } }, ratio: null, min: 1, max: 1, format: "png", seconds: null },
|
|
37
|
+
};
|
|
38
|
+
export const creativeFields = {
|
|
39
|
+
name: { stores: ["app_store", "play"], max: 30, count: "graphemes", review: "version" },
|
|
40
|
+
subtitle: { stores: ["app_store"], max: 30, count: "graphemes", review: "version" },
|
|
41
|
+
keywords: { stores: ["app_store"], max: 100, count: "bytes", review: "version" },
|
|
42
|
+
promotional_text: { stores: ["app_store"], max: 170, count: "graphemes", review: "none" },
|
|
43
|
+
description: { stores: ["app_store", "play"], max: 4000, count: "graphemes", review: "version" },
|
|
44
|
+
whats_new: { stores: ["app_store"], max: 4000, count: "graphemes", review: "version" },
|
|
45
|
+
short_description: { stores: ["play"], max: 80, count: "graphemes", review: "google" },
|
|
46
|
+
event_name: { stores: ["app_store"], max: 30, count: "graphemes", review: "event" },
|
|
47
|
+
event_short: { stores: ["app_store"], max: 50, count: "graphemes", review: "event" },
|
|
48
|
+
event_long: { stores: ["app_store"], max: 120, count: "graphemes", review: "event" },
|
|
49
|
+
};
|
|
50
|
+
export const CAPTURE_FILE_MAX_BYTES = 90 * 1024 * 1024;
|
|
51
|
+
export const captureFormats = {
|
|
52
|
+
image: { ext: "png", contentType: "image/png" },
|
|
53
|
+
video: { ext: "mp4", contentType: "video/mp4" },
|
|
54
|
+
};
|
|
55
|
+
export const CREATIVE_ASSET_MAX_BYTES = 20 * 1024 * 1024;
|
|
56
|
+
export const REFERENCE_FILE_MAX_BYTES = CAPTURE_FILE_MAX_BYTES;
|
|
57
|
+
export const CREATIVE_ART_ROLES = ["screen_art", "character", "reward_item", "background", "icon", "store_background", "social_frame", "celebration", "screen_video"];
|
|
58
|
+
export const CREATIVE_ART_USES = ["paywall", "onboarding", "offer", "celebration", "store_screenshot", "store_header", "social", "in_app", "notification"];
|
|
59
|
+
export const CREATIVE_ART_TEXT_MAX = { reference: 200, method: 80, prompt: 4000, style: 200 };
|
|
60
|
+
export const CREATIVE_ART_TAGS_MAX = 30;
|
|
61
|
+
export const CREATIVE_ART_VIDEO_ROLE = "screen_video";
|
|
62
|
+
export const SCREEN_VIDEO_MAX_BYTES = 2_621_440;
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const campaignEventNames: readonly ["campaign_eligible", "campaign_skipped", "campaign_rejected", "campaigns_stale", "campaigns_loaded", "campaign_shown", "campaign_tapped", "campaign_dismissed", "campaign_action_completed"];
|
|
2
|
+
export declare const appEventNames: readonly ["app_updated", "app_open"];
|
|
3
|
+
export declare const linkEventNames: readonly ["link_opened", "attribution_recorded", "invite_sent", "invite_accepted"];
|
|
4
|
+
export declare const supportEventNames: readonly ["support_ticket_created", "support_ticket_answered", "support_ticket_resolved"];
|
|
5
|
+
export declare const surveyEventNames: readonly ["survey_answered"];
|
|
6
|
+
export declare const subscriptionEventNames: readonly ["subscription_changed"];
|
|
7
|
+
export declare const accessGrantEventNames: readonly ["access_grant_changed"];
|
|
8
|
+
export declare const paywallEventNames: readonly ["paywall_shown", "paywall_closed", "paywall_purchase_tapped", "onboarding_step"];
|
|
9
|
+
export declare const configEventNames: readonly ["config_exposed", "config_rejected"];
|
|
10
|
+
export declare const screenEventNames: readonly ["screen_shown", "screen_action", "screen_closed", "screen_failed"];
|
|
11
|
+
export type AppGrowStackEventName = (typeof campaignEventNames)[number] | (typeof appEventNames)[number] | (typeof linkEventNames)[number] | (typeof supportEventNames)[number] | (typeof surveyEventNames)[number] | (typeof configEventNames)[number] | (typeof screenEventNames)[number] | (typeof subscriptionEventNames)[number] | (typeof accessGrantEventNames)[number] | (typeof paywallEventNames)[number];
|
|
12
|
+
export declare const NON_TRIGGER_PREFIXES: readonly ["campaign_", "campaigns_", "survey_"];
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const campaignEventNames = [
|
|
2
|
+
"campaign_eligible",
|
|
3
|
+
"campaign_skipped",
|
|
4
|
+
"campaign_rejected",
|
|
5
|
+
"campaigns_stale",
|
|
6
|
+
"campaigns_loaded",
|
|
7
|
+
"campaign_shown",
|
|
8
|
+
"campaign_tapped",
|
|
9
|
+
"campaign_dismissed",
|
|
10
|
+
"campaign_action_completed",
|
|
11
|
+
];
|
|
12
|
+
export const appEventNames = ["app_updated", "app_open"];
|
|
13
|
+
export const linkEventNames = ["link_opened", "attribution_recorded", "invite_sent", "invite_accepted"];
|
|
14
|
+
export const supportEventNames = ["support_ticket_created", "support_ticket_answered", "support_ticket_resolved"];
|
|
15
|
+
export const surveyEventNames = ["survey_answered"];
|
|
16
|
+
export const subscriptionEventNames = ["subscription_changed"];
|
|
17
|
+
export const accessGrantEventNames = ["access_grant_changed"];
|
|
18
|
+
export const paywallEventNames = ["paywall_shown", "paywall_closed", "paywall_purchase_tapped", "onboarding_step"];
|
|
19
|
+
export const configEventNames = ["config_exposed", "config_rejected"];
|
|
20
|
+
export const screenEventNames = ["screen_shown", "screen_action", "screen_closed", "screen_failed"];
|
|
21
|
+
export const NON_TRIGGER_PREFIXES = ["campaign_", "campaigns_", "survey_"];
|