@openpolicy/sdk 0.0.4 → 0.0.7
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.ts +107 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -0
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,108 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region ../core/dist/index.d.ts
|
|
2
|
+
type Jurisdiction = "us" | "eu" | "ca" | "au" | "nz" | "other";
|
|
3
|
+
type PrivacyPolicyConfig = {
|
|
4
|
+
effectiveDate: string;
|
|
5
|
+
company: {
|
|
6
|
+
name: string;
|
|
7
|
+
legalName: string;
|
|
8
|
+
address: string;
|
|
9
|
+
contact: string;
|
|
10
|
+
};
|
|
11
|
+
dataCollected: Record<string, string[]>;
|
|
12
|
+
legalBasis: string;
|
|
13
|
+
retention: Record<string, string>;
|
|
14
|
+
cookies: {
|
|
15
|
+
essential: boolean;
|
|
16
|
+
analytics: boolean;
|
|
17
|
+
marketing: boolean;
|
|
18
|
+
};
|
|
19
|
+
thirdParties: {
|
|
20
|
+
name: string;
|
|
21
|
+
purpose: string;
|
|
22
|
+
}[];
|
|
23
|
+
userRights: string[];
|
|
24
|
+
jurisdictions: Jurisdiction[];
|
|
25
|
+
};
|
|
26
|
+
type DisputeResolutionMethod = "arbitration" | "litigation" | "mediation";
|
|
27
|
+
type TermsOfServiceConfig = {
|
|
28
|
+
effectiveDate: string;
|
|
29
|
+
company: {
|
|
30
|
+
name: string;
|
|
31
|
+
legalName: string;
|
|
32
|
+
address: string;
|
|
33
|
+
contact: string;
|
|
34
|
+
};
|
|
35
|
+
acceptance: {
|
|
36
|
+
methods: string[];
|
|
37
|
+
};
|
|
38
|
+
eligibility?: {
|
|
39
|
+
minimumAge: number;
|
|
40
|
+
jurisdictionRestrictions?: string[];
|
|
41
|
+
};
|
|
42
|
+
accounts?: {
|
|
43
|
+
registrationRequired: boolean;
|
|
44
|
+
userResponsibleForCredentials: boolean;
|
|
45
|
+
companyCanTerminate: boolean;
|
|
46
|
+
};
|
|
47
|
+
prohibitedUses?: string[];
|
|
48
|
+
userContent?: {
|
|
49
|
+
usersOwnContent: boolean;
|
|
50
|
+
licenseGrantedToCompany: boolean;
|
|
51
|
+
licenseDescription?: string;
|
|
52
|
+
companyCanRemoveContent: boolean;
|
|
53
|
+
};
|
|
54
|
+
intellectualProperty?: {
|
|
55
|
+
companyOwnsService: boolean;
|
|
56
|
+
usersMayNotCopy: boolean;
|
|
57
|
+
};
|
|
58
|
+
payments?: {
|
|
59
|
+
hasPaidFeatures: boolean;
|
|
60
|
+
refundPolicy?: string;
|
|
61
|
+
priceChangesNotice?: string;
|
|
62
|
+
};
|
|
63
|
+
availability?: {
|
|
64
|
+
noUptimeGuarantee: boolean;
|
|
65
|
+
maintenanceWindows?: string;
|
|
66
|
+
};
|
|
67
|
+
termination?: {
|
|
68
|
+
companyCanTerminate: boolean;
|
|
69
|
+
userCanTerminate: boolean;
|
|
70
|
+
effectOfTermination?: string;
|
|
71
|
+
};
|
|
72
|
+
disclaimers?: {
|
|
73
|
+
serviceProvidedAsIs: boolean;
|
|
74
|
+
noWarranties: boolean;
|
|
75
|
+
};
|
|
76
|
+
limitationOfLiability?: {
|
|
77
|
+
excludesIndirectDamages: boolean;
|
|
78
|
+
liabilityCap?: string;
|
|
79
|
+
};
|
|
80
|
+
indemnification?: {
|
|
81
|
+
userIndemnifiesCompany: boolean;
|
|
82
|
+
scope?: string;
|
|
83
|
+
};
|
|
84
|
+
thirdPartyServices?: {
|
|
85
|
+
name: string;
|
|
86
|
+
purpose: string;
|
|
87
|
+
}[];
|
|
88
|
+
disputeResolution?: {
|
|
89
|
+
method: DisputeResolutionMethod;
|
|
90
|
+
venue?: string;
|
|
91
|
+
classActionWaiver?: boolean;
|
|
92
|
+
};
|
|
93
|
+
governingLaw: {
|
|
94
|
+
jurisdiction: string;
|
|
95
|
+
};
|
|
96
|
+
changesPolicy?: {
|
|
97
|
+
noticeMethod: string;
|
|
98
|
+
noticePeriodDays?: number;
|
|
99
|
+
};
|
|
100
|
+
privacyPolicyUrl?: string;
|
|
101
|
+
};
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/index.d.ts
|
|
104
|
+
declare function definePrivacyPolicy(config: PrivacyPolicyConfig): PrivacyPolicyConfig;
|
|
105
|
+
declare function defineTermsOfService(config: TermsOfServiceConfig): TermsOfServiceConfig;
|
|
106
|
+
//#endregion
|
|
107
|
+
export { type PrivacyPolicyConfig, type TermsOfServiceConfig, definePrivacyPolicy, defineTermsOfService };
|
|
4
108
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["OutputFormat","CompileOptions","formats","PolicySection","id","title","body","Jurisdiction","PrivacyPolicyConfig","Record","effectiveDate","company","name","legalName","address","contact","dataCollected","legalBasis","retention","cookies","essential","analytics","marketing","thirdParties","purpose","userRights","jurisdictions","DisputeResolutionMethod","TermsOfServiceConfig","acceptance","methods","eligibility","minimumAge","jurisdictionRestrictions","accounts","registrationRequired","userResponsibleForCredentials","companyCanTerminate","prohibitedUses","userContent","usersOwnContent","licenseGrantedToCompany","licenseDescription","companyCanRemoveContent","intellectualProperty","companyOwnsService","usersMayNotCopy","payments","hasPaidFeatures","refundPolicy","priceChangesNotice","availability","noUptimeGuarantee","maintenanceWindows","termination","userCanTerminate","effectOfTermination","disclaimers","serviceProvidedAsIs","noWarranties","limitationOfLiability","excludesIndirectDamages","liabilityCap","indemnification","userIndemnifiesCompany","scope","thirdPartyServices","disputeResolution","method","venue","classActionWaiver","governingLaw","jurisdiction","changesPolicy","noticeMethod","noticePeriodDays","privacyPolicyUrl","PolicyInput","type","ValidationIssue","level","message","compilePrivacyPolicy","config","options","format","content","sections","compileTermsOfService","validatePrivacyPolicy","validateTermsOfService","compilePolicy","input"],"sources":["../../core/dist/index.d.ts","../src/index.ts"],"mappings":";KAUKO,YAAAA;AAAAA,KACAC,mBAAAA;EACHE,aAAAA;EACAC,OAAAA;IACEC,IAAAA;IACAC,SAAAA;IACAC,OAAAA;IACAC,OAAAA;EAAAA;EAEFC,aAAAA,EAAeP,MAAAA;EACfQ,UAAAA;EACAC,SAAAA,EAAWT,MAAAA;EACXU,OAAAA;IACEC,SAAAA;IACAC,SAAAA;IACAC,SAAAA;EAAAA;EAEFC,YAAAA;IACEX,IAAAA;IACAY,OAAAA;EAAAA;EAEFC,UAAAA;EACAC,aAAAA,EAAenB,YAAAA;AAAAA;AAAAA,KAEZoB,uBAAAA;AAAAA,KACAC,oBAAAA;EACHlB,aAAAA;EACAC,OAAAA;IACEC,IAAAA;IACAC,SAAAA;IACAC,OAAAA;IACAC,OAAAA;EAAAA;EAEFc,UAAAA;IACEC,OAAAA;EAAAA;EAEFC,WAAAA;IACEC,UAAAA;IACAC,wBAAAA;EAAAA;EAEFC,QAAAA;IACEC,oBAAAA;IACAC,6BAAAA;IACAC,mBAAAA;EAAAA;EAEFC,cAAAA;EACAC,WAAAA;IACEC,eAAAA;IACAC,uBAAAA;IACAC,kBAAAA;IACAC,uBAAAA;EAAAA;EAEFC,oBAAAA;IACEC,kBAAAA;IACAC,eAAAA;EAAAA;EAEFC,QAAAA;IACEC,eAAAA;IACAC,YAAAA;IACAC,kBAAAA;EAAAA;EAEFC,YAAAA;IACEC,iBAAAA;IACAC,kBAAAA;EAAAA;EAEFC,WAAAA;IACEjB,mBAAAA;IACAkB,gBAAAA;IACAC,mBAAAA;EAAAA;EAEFC,WAAAA;IACEC,mBAAAA;IACAC,YAAAA;EAAAA;EAEFC,qBAAAA;IACEC,uBAAAA;IACAC,YAAAA;EAAAA;EAEFC,eAAAA;IACEC,sBAAAA;IACAC,KAAAA;EAAAA;EAEFC,kBAAAA;IACEtD,IAAAA;IACAY,OAAAA;EAAAA;EAEF2C,iBAAAA;IACEC,MAAAA,EAAQzC,uBAAAA;IACR0C,KAAAA;IACAC,iBAAAA;EAAAA;EAEFC,YAAAA;IACEC,YAAAA;EAAAA;EAEFC,aAAAA;IACEC,YAAAA;IACAC,gBAAAA;EAAAA;EAEFC,gBAAAA;AAAAA;;;iBClGc,mBAAA,CACf,MAAA,EAAQ,mBAAA,GACN,mBAAA;AAAA,iBAIa,oBAAA,CACf,MAAA,EAAQ,oBAAA,GACN,oBAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/index.ts
|
|
2
2
|
function definePrivacyPolicy(config) {
|
|
3
|
-
|
|
3
|
+
return config;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
5
|
+
function defineTermsOfService(config) {
|
|
6
|
+
return config;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { definePrivacyPolicy, defineTermsOfService };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type {\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n} from \"@openpolicy/core\";\n\nexport type {\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n} from \"@openpolicy/core\";\n\nexport function definePrivacyPolicy(\n\tconfig: PrivacyPolicyConfig,\n): PrivacyPolicyConfig {\n\treturn config;\n}\n\nexport function defineTermsOfService(\n\tconfig: TermsOfServiceConfig,\n): TermsOfServiceConfig {\n\treturn config;\n}\n"],"mappings":";AAUA,SAAgB,oBACf,QACsB;AACtB,QAAO;;AAGR,SAAgB,qBACf,QACuB;AACvB,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpolicy/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Public API for defining privacy policies with OpenPolicy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"dev": "
|
|
24
|
-
"build": "
|
|
23
|
+
"dev": "rolldown -c --watch",
|
|
24
|
+
"build": "rolldown -c",
|
|
25
25
|
"check-types": "tsc --noEmit",
|
|
26
26
|
"test": "bun test"
|
|
27
27
|
},
|
|
28
|
+
"dependencies": {},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@openpolicy/core": "workspace:*",
|
|
30
31
|
"@openpolicy/tooling": "workspace:*"
|